All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: linux-nfc@lists.01.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Subject: [linux-nfc] [neard][PATCH 3/7] snep: remove useless NULL-ify of local pointer variable
Date: Fri, 16 Jul 2021 12:08:40 +0200	[thread overview]
Message-ID: <20210716100844.51360-4-krzysztof.kozlowski@canonical.com> (raw)
In-Reply-To: <20210716100844.51360-1-krzysztof.kozlowski@canonical.com>

Assigning NULL to a local variable (a pointer) at the end of function
does not have any effect as this NULL is not passed outside.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 src/snep.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/snep.c b/src/snep.c
index a1e90243c020..737060139b07 100644
--- a/src/snep.c
+++ b/src/snep.c
@@ -206,7 +206,6 @@ static void free_snep_core_fragment(gpointer data)
 		g_free(fragment->data);
 
 	g_free(fragment);
-	fragment = NULL;
 }
 
 static void free_snep_core_push_data(gpointer userdata, int status)
-- 
2.27.0
_______________________________________________
Linux-nfc mailing list -- linux-nfc@lists.01.org
To unsubscribe send an email to linux-nfc-leave@lists.01.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: linux-nfc@lists.01.org
Subject: [neard][PATCH 3/7] snep: remove useless NULL-ify of local pointer variable
Date: Fri, 16 Jul 2021 12:08:40 +0200	[thread overview]
Message-ID: <20210716100844.51360-4-krzysztof.kozlowski@canonical.com> (raw)
In-Reply-To: <20210716100844.51360-1-krzysztof.kozlowski@canonical.com>

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

Assigning NULL to a local variable (a pointer) at the end of function
does not have any effect as this NULL is not passed outside.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 src/snep.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/snep.c b/src/snep.c
index a1e90243c020..737060139b07 100644
--- a/src/snep.c
+++ b/src/snep.c
@@ -206,7 +206,6 @@ static void free_snep_core_fragment(gpointer data)
 		g_free(fragment->data);
 
 	g_free(fragment);
-	fragment = NULL;
 }
 
 static void free_snep_core_push_data(gpointer userdata, int status)
-- 
2.27.0

  parent reply	other threads:[~2021-07-16 10:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 10:08 [linux-nfc] [neard][PATCH 0/7] Fixes for more memory issues Krzysztof Kozlowski
2021-07-16 10:08 ` Krzysztof Kozlowski
2021-07-16 10:08 ` [linux-nfc] [neard][PATCH 1/7] snep: do not open-code freeing ndef message Krzysztof Kozlowski
2021-07-16 10:08   ` Krzysztof Kozlowski
2021-07-16 10:08 ` [linux-nfc] [neard][PATCH 2/7] unit: fix memory leaks in test-ndef-build Krzysztof Kozlowski
2021-07-16 10:08   ` Krzysztof Kozlowski
2021-07-16 10:08 ` Krzysztof Kozlowski [this message]
2021-07-16 10:08   ` [neard][PATCH 3/7] snep: remove useless NULL-ify of local pointer variable Krzysztof Kozlowski
2021-07-16 10:08 ` [linux-nfc] [neard][PATCH 4/7] snep: fix double free of GSList Krzysztof Kozlowski
2021-07-16 10:08   ` Krzysztof Kozlowski
2021-07-16 10:08 ` [linux-nfc] [neard][PATCH 5/7] unit: fix memory leaks in test-snep-read error paths Krzysztof Kozlowski
2021-07-16 10:08   ` Krzysztof Kozlowski
2021-07-16 10:08 ` [linux-nfc] [neard][PATCH 6/7] unit: fix record memory leak in test-snep-read Krzysztof Kozlowski
2021-07-16 10:08   ` Krzysztof Kozlowski
2021-07-16 10:08 ` [linux-nfc] [neard][PATCH 7/7] unit: fix records GList " Krzysztof Kozlowski
2021-07-16 10:08   ` Krzysztof Kozlowski

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=20210716100844.51360-4-krzysztof.kozlowski@canonical.com \
    --to=krzysztof.kozlowski@canonical.com \
    --cc=linux-nfc@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.