From patchwork Thu Jun 7 02:00:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Stewart X-Patchwork-Id: 163454 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 843DCB6F13 for ; Thu, 7 Jun 2012 12:13:33 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id CD1659C19C; Wed, 6 Jun 2012 22:13:30 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C2tN4Du1xVCG; Wed, 6 Jun 2012 22:13:30 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id A92AC9C1B5; Wed, 6 Jun 2012 22:13:26 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 3FF879C1B5 for ; Wed, 6 Jun 2012 22:13:25 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X0pgF7okzc48 for ; Wed, 6 Jun 2012 22:13:21 -0400 (EDT) Received: from mail-bk0-f74.google.com (mail-bk0-f74.google.com [209.85.214.74]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id E7FEB9C19C for ; Wed, 6 Jun 2012 22:13:20 -0400 (EDT) Received: by bkty5 with SMTP id y5so4803bkt.5 for ; Wed, 06 Jun 2012 19:13:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:date:subject:to:message-id:x-gm-message-state; bh=t1bsaPtKHodmXC2n6p7Ad/nOdbWt8vPLKevX2OV8iTk=; b=drKDTCI5oCRmcnFGUe9PnFoed85Z4ELFhHVW5KMfrDhGN/ntYbxduC3gsb6Htxw60n 5KRqT1/orR1xCr0O1CrOVWTKV+9dNCftn/gPLdIef8o2H8NTLnSKx3kmgL/VOFS1TjNO TKn/IZRCkzoO3zKzvVs2c4TP9ihPukWzJI5A6If9Nx9jblWw/3kQYrDK77Z9bSxstBgZ xLg7iKT1sTRsgbCFH7HFv1KRgT4QEpAXrAxTAbzeT5yOxWZR3W0LgzWGf5z6RTcIkwkc e1bH5HwZNQS23Y5s+kUN5IiXfOiWFfwgVS/+cBPnOsen0wnlwxsSc3+rMXN6zrfW1sJJ TFMg== Received: by 10.14.185.140 with SMTP id u12mr205155eem.0.1339035199568; Wed, 06 Jun 2012 19:13:19 -0700 (PDT) Received: by 10.14.185.140 with SMTP id u12mr205150eem.0.1339035199454; Wed, 06 Jun 2012 19:13:19 -0700 (PDT) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id b16si1541240eeg.3.2012.06.06.19.13.19 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 06 Jun 2012 19:13:19 -0700 (PDT) Received: from glenhelen.mtv.corp.google.com (glenhelen.mtv.corp.google.com [172.22.72.223]) by hpza10.eem.corp.google.com (Postfix) with ESMTP id 4356E200057 for ; Wed, 6 Jun 2012 19:13:19 -0700 (PDT) Received: by glenhelen.mtv.corp.google.com (Postfix, from userid 110058) id 7F49820432; Wed, 6 Jun 2012 19:13:18 -0700 (PDT) From: Paul Stewart Date: Wed, 6 Jun 2012 19:00:33 -0700 Subject: [PATCH] Fix a couple memory leaks To: hostap@lists.shmoo.com Message-Id: <20120607021318.7F49820432@glenhelen.mtv.corp.google.com> X-Gm-Message-State: ALoCoQm5Iw5M/JFKej4gQOqIJQG0MXs7UOltWiR4kPytDkOAfTnXz5P3QoS73qSlWmYB6ubbjMuM0vzJDVg0gHxQx/w8TKT0J183s8J9cBt1TUVMu9BsiNAuHk5GvbJQW+K8VUbC5B/nxD9OmbUcyeTfbMNXrVvMuqXeWJyp8o+id2L2IQyl4IE= X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com Found using valgrind. Signed-hostap: Paul Stewart --- src/drivers/driver_nl80211.c | 3 ++- wpa_supplicant/dbus/dbus_new_handlers.c | 1 + 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 92a7de0..bb6e1d3 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -8403,12 +8403,13 @@ static int nl80211_signal_monitor(void *priv, int threshold, int hysteresis) NLA_PUT_U32(cqm, NL80211_ATTR_CQM_RSSI_HYST, hysteresis); nla_put_nested(msg, NL80211_ATTR_CQM, cqm); + nlmsg_free(cqm); + if (send_and_recv_msgs(drv, msg, NULL, NULL) == 0) return 0; msg = NULL; nla_put_failure: - nlmsg_free(cqm); nlmsg_free(msg); return -1; } diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c index 3a5bcab..4cab426 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.c +++ b/wpa_supplicant/dbus/dbus_new_handlers.c @@ -614,6 +614,7 @@ DBusMessage * wpas_dbus_handler_create_interface(DBusMessage *message, out: os_free(driver); os_free(ifname); + os_free(confname); os_free(bridge_ifname); return reply;