isdn: eicon: free pointer after using it in log msg in divas_um_idi_delete_entity()
authorJesper Juhl <jj@chaosbits.net>
Mon, 30 Sep 2013 19:25:27 +0000 (21:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Oct 2013 20:00:59 +0000 (16:00 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/hardware/eicon/um_idi.c

index 7cab5c3276c2e16f9e91fb97a635e7ccdf6640b5..e1519718ce67e3ed4363078eb3e8207b6b9f1db6 100644 (file)
@@ -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);
 }
This page took 0.025253 seconds and 5 git commands to generate.