Message ID | 20240618200231.1129282-31-denkenz@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Received: from mail-oa1-f43.google.com (mail-oa1-f43.google.com [209.85.160.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27B6516DED1 for <ofono@lists.linux.dev>; Tue, 18 Jun 2024 20:02:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718740979; cv=none; b=e1PMibJEdDsM2G+Pr6L0xjTDVT4vMRtV9tgxsi8g4SEUWbuIzPK/YbqtG07CGw5bp9Y4WIjrokHWutLSi4dm6fIVnXoVvOdLr7CjlmYw5aLdD64xDjM7XaWRzwF4CckAjcjpOhrixORwqSGkgE1Juy4ET0zkdfSJMF59+/5sSO8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718740979; c=relaxed/simple; bh=yCASfTUa+mVbFQpxIgvKw6xLhMDlWjmwUkHHvr0CTFA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PsI1vmmGNACF46Tt5DKxM0nzdS/2tOHzuaF2+6KsrYBwCoW9+0ZWixCBHw/e+2uWbjoM2SJWPCZzPOjhFF431XYKs1cdY3u1LULk26Yi6H1y1D4yKbFOP7WYwMZthCOtLmCZ/tR1h5imNn2a0KkqlX+yqdvNC/7aQdlkN6LWNGc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Sc7O6FYu; arc=none smtp.client-ip=209.85.160.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Sc7O6FYu" Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-254a7fe21aeso92453fac.0 for <ofono@lists.linux.dev>; Tue, 18 Jun 2024 13:02:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718740977; x=1719345777; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3wIy4qRUI1gV6a2AuRMXprV+NjXE4khA/yj+e1Qp8qQ=; b=Sc7O6FYuCnj9QdcbWVQeNwoiTrMXDbMRwR/RhoQ6lfDPXbjYQldRP8vyyaNqULPoAx 3evgrKKMbpMeIR3aK7t0ZRNA2isD7Y34jVA8uqk77dpV8GFhi0FIt1xaVuG0pjUvq4mN SmSgJstlPBQbLKsccsChWCjQ3Mqpj4Lzx2V2H39lP46w8tZWZRD6TVtmKp3/FjjFd+H7 iOM8qZ2cPojqm5OVpzMCDXf4HBCnPu4BYAb+gqx4Gptqg4Xcre89xCEFjLmjel15JJ2Z vPtWQ5pnGGWVzHJpTqcI7AQXONGe9mVXFOxoqk7bLp0tgg6jSDjQ9oQD8J7oKIiOdKeh FH1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718740977; x=1719345777; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3wIy4qRUI1gV6a2AuRMXprV+NjXE4khA/yj+e1Qp8qQ=; b=WjfbynY41q57m5eueeYx1HajZjjWrTSvvAfoGL809RxLdmmVEUDaO02C9DedKpPzge WeXzD3hYfUnMPvz8XLwAbDKesdcQY6YtH7ofKL8siCWjAH+U9hY3DRYqLJVu7fZVtkKA v5DdATtMTcf6zxmPMfY67+NeBo2jwpWAe6YlGtEoZ7dige+Eolz/4aYJzUiiOcBJ6VPc yrADb4Kusd85uzDJ5N5bOsiAk4IEsqISzHvpia0BYIKuB8yipMuPa+pi2tEOBtghdZcm rbccyV4j0kBYUeiVWdaZ7Ubb62BHWS7tqFsBEmQkyZP0SExjuFBs/f9uLNhrl6SpmfZk OTQg== X-Gm-Message-State: AOJu0YwcUfZCIeb26xE5C9qpXH27JLxuBM+OxV8Z3qQGIVmGjFUYMwwg zYkbsD7C5RVce2vjU8JvnuR9Sosje9VWQKxov2J/KVYopRevAWv367vwAg== X-Google-Smtp-Source: AGHT+IFGXEmrGTigwVEaFla9iEq5iGAdZRVidCKNrtejqSJcoqEkGDFzEke0QBCHUDJ3Gpl9Q+XQLA== X-Received: by 2002:a05:6870:f14e:b0:259:7767:3767 with SMTP id 586e51a60fabf-259776737edmr1378362fac.8.1718740977161; Tue, 18 Jun 2024 13:02:57 -0700 (PDT) Received: from localhost.localdomain (syn-070-114-247-242.res.spectrum.com. [70.114.247.242]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2567a9a7d31sm3305744fac.14.2024.06.18.13.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 13:02:56 -0700 (PDT) From: Denis Kenzior <denkenz@gmail.com> To: ofono@lists.linux.dev Cc: Denis Kenzior <denkenz@gmail.com> Subject: [PATCH v2 31/33] gprs: Fix memory leak Date: Tue, 18 Jun 2024 15:02:13 -0500 Message-ID: <20240618200231.1129282-31-denkenz@gmail.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240618200231.1129282-1-denkenz@gmail.com> References: <20240618200231.1129282-1-denkenz@gmail.com> Precedence: bulk X-Mailing-List: ofono@lists.linux.dev List-Id: <ofono.lists.linux.dev> List-Subscribe: <mailto:ofono+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:ofono+unsubscribe@lists.linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit |
Series |
[v2,01/33] qmi: Remove qmi_free()
|
expand
|
diff --git a/src/gprs.c b/src/gprs.c index 57b823b0f1c6..97d6f382e87d 100644 --- a/src/gprs.c +++ b/src/gprs.c @@ -3014,9 +3014,6 @@ static void gprs_unregister(struct ofono_atom *atom) free_contexts(gprs); - l_uintset_free(gprs->used_cids); - gprs->used_cids = NULL; - if (gprs->netreg_watch) { if (gprs->status_watch) { __ofono_netreg_remove_status_watch(gprs->netreg, @@ -3055,6 +3052,9 @@ static void gprs_remove(struct ofono_atom *atom) if (gprs->suspend_timeout) g_source_remove(gprs->suspend_timeout); + l_uintset_free(gprs->used_cids); + gprs->used_cids = NULL; + l_uintset_free(gprs->used_pids); gprs->used_pids = NULL;