From: <d.grigorev@omp.ru>
To: <ofono@lists.linux.dev>
Cc: Denis Grigorev <d.grigorev@omp.ru>
Subject: [PATCH 6/6] voicecall: Avoid potential double free
Date: Fri, 18 Feb 2022 11:53:00 +0300 [thread overview]
Message-ID: <20220218085300.22585-7-d.grigorev@omp.ru> (raw)
In-Reply-To: <20220218085300.22585-1-d.grigorev@omp.ru>
From: Denis Grigorev <d.grigorev@omp.ru>
There's no need to free the memory pointed by v, since it is already
freed in voicecall_dbus_register() or v is null.
---
src/voicecall.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/voicecall.c b/src/voicecall.c
index 3da258d8..bb42402f 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -2478,9 +2478,6 @@ void ofono_voicecall_notify(struct ofono_voicecall *vc,
error:
if (newcall)
g_free(newcall);
-
- if (v)
- g_free(v);
}
void ofono_voicecall_mpty_hint(struct ofono_voicecall *vc, unsigned int ids)
--
2.17.1
prev parent reply other threads:[~2022-02-18 9:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-18 8:52 [PATCH 0/6] Fix issues found with static analyzer d.grigorev
2022-02-18 8:52 ` [PATCH 1/6] phonebook: Fix potential buffer overflow d.grigorev
2022-02-18 8:52 ` [PATCH 2/6] stemodem: Fix buffer size allocated for rtnl_msg d.grigorev
2022-02-18 8:52 ` [PATCH 3/6] sms: Fix buffer size allocated for SMS PDU d.grigorev
2022-02-18 8:52 ` [PATCH 4/6] atmodem: Fix potential buffer overflow d.grigorev
2022-02-18 8:52 ` [PATCH 5/6] emulator: Avoid potential null dereference d.grigorev
2022-02-18 8:53 ` d.grigorev [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220218085300.22585-7-d.grigorev@omp.ru \
--to=d.grigorev@omp.ru \
--cc=ofono@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).