From: Daniel Wagner Date: Wed, 19 Sep 2012 12:50:02 +0000 (+0200) Subject: session: No need to free NULL list X-Git-Tag: 1.8~65 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ebbc177367ef304e617b6c5613666c4947f1657;p=platform%2Fupstream%2Fconnman.git session: No need to free NULL list --- diff --git a/src/session.c b/src/session.c index c7c72a5..96b2e59 100644 --- a/src/session.c +++ b/src/session.c @@ -325,11 +325,8 @@ static GSList *session_allowed_bearers_any(void) GSList *list = NULL; info = g_try_new0(struct bearer_info, 1); - if (info == NULL) { - g_slist_free(list); - + if (info == NULL) return NULL; - } info->name = g_strdup(""); info->match_all = TRUE;