From dfbf8e031e0e7f9dbaedc838d98d16cd140d7ec9 Mon Sep 17 00:00:00 2001 From: Erwan Croze Date: Wed, 8 Nov 2017 11:39:00 +0100 Subject: [PATCH] Fix uninitialized variable --- coreapi/linphonecore.c | 2 +- src/content/content-manager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 090f90641..86893059d 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2608,7 +2608,7 @@ void linphone_core_add_friend_list(LinphoneCore *lc, LinphoneFriendList *list) { const bctbx_list_t * linphone_core_find_contacts_by_char(LinphoneCore *core, const char *filter, bool_t sip_only) { // Get sipuri from filter if possible - bctbx_list_t *list, *_list = NULL; + bctbx_list_t *list = NULL, *_list = NULL; LinphoneAddress *addr = linphone_core_interpret_url(core, (sip_only) ? filter : ""); bctbx_list_t* listFriendsList = (bctbx_list_t*)linphone_core_get_friends_lists(core); bctbx_list_t* listFriend = (listFriendsList != NULL) diff --git a/src/content/content-manager.cpp b/src/content/content-manager.cpp index c3071ca19..285c3f998 100644 --- a/src/content/content-manager.cpp +++ b/src/content/content-manager.cpp @@ -74,7 +74,7 @@ list ContentManager::multipartToContentLists (Content content) const { Content ContentManager::contentsListToMultipart (list contents) const { char *desc; string sub; - belle_sip_memory_body_handler_t *mbh; + belle_sip_memory_body_handler_t *mbh = NULL; belle_sip_multipart_body_handler_t *mpbh = belle_sip_multipart_body_handler_new(NULL, NULL, NULL, MULTIPART_BOUNDARY); belle_sip_object_ref(mpbh); for (const auto &content : contents) {