Commit 5c0bdf95 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Fixed another leak

parent 6c146116
......@@ -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);
}
......
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