Skip to content

Commit

Permalink
isdn: eicon: free pointer after using it in log msg in divas_um_idi_d…
Browse files Browse the repository at this point in the history
…elete_entity()

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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jjuhl authored and davem330 committed Oct 2, 2013
1 parent 99d3d58 commit 8455778
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/isdn/hardware/eicon/um_idi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 8455778

Please sign in to comment.