mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 17:29:20 +00:00
Fixed another leak
This commit is contained in:
parent
6c146116b3
commit
5c0bdf95bd
1 changed files with 6 additions and 0 deletions
|
|
@ -919,6 +919,10 @@ int linphone_core_import_friends_from_vcard4_file(LinphoneCore *lc, const char *
|
|||
#ifndef VCARD_ENABLED
|
||||
ms_error("vCard support wasn't enabled at compilation time");
|
||||
#endif
|
||||
if (!vcards) {
|
||||
ms_error("Failed to parse the file %s", vcard_file);
|
||||
return -1;
|
||||
}
|
||||
while (vcards != NULL && vcards->data != NULL) {
|
||||
LinphoneVCard *vcard = (LinphoneVCard *)vcards->data;
|
||||
LinphoneFriend *lf = linphone_friend_new_from_vcard(vcard);
|
||||
|
|
@ -927,6 +931,8 @@ int linphone_core_import_friends_from_vcard4_file(LinphoneCore *lc, const char *
|
|||
count++;
|
||||
}
|
||||
linphone_friend_unref(lf);
|
||||
} else {
|
||||
linphone_vcard_free(vcard);
|
||||
}
|
||||
vcards = ms_list_next(vcards);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue