* [PATCH] isdn: eicon: free pointer after using it in log msg in divas_um_idi_delete_entity()
@ 2013-09-30 19:25 Jesper Juhl
2013-10-02 20:01 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jesper Juhl @ 2013-09-30 19:25 UTC (permalink / raw)
To: Armin Schindler; +Cc: Karsten Keil, netdev, linux-kernel
Not really a problem, but nice IMHO; the Coverity static analyzer
complains that we use the pointer 'e' after it has been freed, so move
the freeing below the final use, even if that use is just using the
value of the pointer and not actually dereferencing it.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
drivers/isdn/hardware/eicon/um_idi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/um_idi.c b/drivers/isdn/hardware/eicon/um_idi.c
index 7cab5c3..e151971 100644
--- a/drivers/isdn/hardware/eicon/um_idi.c
+++ b/drivers/isdn/hardware/eicon/um_idi.c
@@ -288,9 +288,9 @@ int divas_um_idi_delete_entity(int adapter_nr, void *entity)
cleanup_entity(e);
diva_os_free(0, e->os_context);
memset(e, 0x00, sizeof(*e));
- diva_os_free(0, e);
DBG_LOG(("A(%d) remove E:%08x", adapter_nr, e));
+ diva_os_free(0, e);
return (0);
}
--
1.7.1
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] isdn: eicon: free pointer after using it in log msg in divas_um_idi_delete_entity()
2013-09-30 19:25 [PATCH] isdn: eicon: free pointer after using it in log msg in divas_um_idi_delete_entity() Jesper Juhl
@ 2013-10-02 20:01 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-10-02 20:01 UTC (permalink / raw)
To: jj; +Cc: mac, isdn, netdev, linux-kernel
From: Jesper Juhl <jj@chaosbits.net>
Date: Mon, 30 Sep 2013 21:25:27 +0200 (CEST)
> Not really a problem, but nice IMHO; the Coverity static analyzer
> complains that we use the pointer 'e' after it has been freed, so move
> the freeing below the final use, even if that use is just using the
> value of the pointer and not actually dereferencing it.
>
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Applied to net-next, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-02 20:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-30 19:25 [PATCH] isdn: eicon: free pointer after using it in log msg in divas_um_idi_delete_entity() Jesper Juhl
2013-10-02 20:01 ` David Miller
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 NNTP newsgroup(s).