fix failing array asserts #355

This commit is contained in:
holger krekel
2019-08-13 22:30:14 +02:00
parent 6292219551
commit 8d2d2bb378
2 changed files with 9 additions and 3 deletions

View File

@@ -1307,7 +1307,9 @@ pub unsafe fn dc_get_next_media(
}
}
dc_array_unref(list);
if !list.is_null() {
dc_array_unref(list);
}
dc_msg_unref(msg);
ret_msg_id
}

View File

@@ -1506,8 +1506,12 @@ unsafe fn create_or_lookup_adhoc_group(
ret_chat_id_blocked: *mut libc::c_int,
chat_id: u32,
chat_id_blocked: i32| {
dc_array_unref(member_ids);
dc_array_unref(chat_ids);
if !member_ids.is_null() {
dc_array_unref(member_ids);
}
if !chat_ids.is_null() {
dc_array_unref(chat_ids);
}
free(chat_ids_str as *mut libc::c_void);
free(grpid as *mut libc::c_void);
free(grpname as *mut libc::c_void);