提交 84557783 编写于 作者: J Jesper Juhl 提交者: David S. Miller

isdn: eicon: free pointer after using it in log msg in divas_um_idi_delete_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: NJesper Juhl <jj@chaosbits.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 99d3d587
...@@ -288,9 +288,9 @@ int divas_um_idi_delete_entity(int adapter_nr, void *entity) ...@@ -288,9 +288,9 @@ int divas_um_idi_delete_entity(int adapter_nr, void *entity)
cleanup_entity(e); cleanup_entity(e);
diva_os_free(0, e->os_context); diva_os_free(0, e->os_context);
memset(e, 0x00, sizeof(*e)); memset(e, 0x00, sizeof(*e));
diva_os_free(0, e);
DBG_LOG(("A(%d) remove E:%08x", adapter_nr, e)); DBG_LOG(("A(%d) remove E:%08x", adapter_nr, e));
diva_os_free(0, e);
return (0); return (0);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册