Commit d31bd8dd authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Few fixes

parent 39b25967
......@@ -617,7 +617,7 @@ void linphone_carddav_fetch_vcards(LinphoneCardDavContext *cdc) {
static LinphoneCardDavQuery* linphone_carddav_create_addressbook_multiget_query(LinphoneCardDavContext *cdc, MSList *vcards) {
LinphoneCardDavQuery *query = (LinphoneCardDavQuery *)ms_new0(LinphoneCardDavQuery, 1);
char body[(ms_list_size(vcards)+1)*300];
char *body = (char *)ms_malloc((ms_list_size(vcards) + 1) * 300 * sizeof(char));
MSList *iterator = vcards;
query->context = cdc;
......@@ -639,6 +639,7 @@ static LinphoneCardDavQuery* linphone_carddav_create_addressbook_multiget_query(
}
sprintf(body, "%s%s", body, "</card:addressbook-multiget>");
query->body = ms_strdup(body);
ms_free(body);
return query;
}
......
......@@ -383,7 +383,9 @@ LinphoneFriendListStatus _linphone_friend_list_add_friend(LinphoneFriendList *li
}
LinphoneFriendListStatus linphone_friend_list_add_friend(LinphoneFriendList *list, LinphoneFriend *lf) {
if (lf->uri == NULL || lf->friend_list) {
if (!list || !lf->uri || lf->friend_list) {
if (!list)
ms_error("linphone_friend_list_add_friend(): invalid list, null");
if (!lf->uri)
ms_error("linphone_friend_list_add_friend(): invalid friend, no sip uri");
if (lf->friend_list)
......
......@@ -6494,6 +6494,12 @@ static void linphone_core_uninit(LinphoneCore *lc)
if (lc->chat_db_file){
ms_free(lc->chat_db_file);
}
if (lc->logs_db_file) {
ms_free(lc->logs_db_file);
}
if (lc->friends_db_file) {
ms_free(lc->friends_db_file);
}
if (lc->ringtoneplayer) {
linphone_ringtoneplayer_destroy(lc->ringtoneplayer);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment