Remove useless checks for NULL before free in OverlayKeyCreate()
There is no need to ensure the pointers passed to free are not NULL, especially right after passing them to strncpy without checking for NULL. Flagged by cppcheck 1.64: [app/xkbcomp/parseutils.c:557] -> [app/xkbcomp/parseutils.c:559]: (warning) Possible null pointer dereference: over - otherwise it is redundant to check it against null. [app/xkbcomp/parseutils.c:558] -> [app/xkbcomp/parseutils.c:561]: (warning) Possible null pointer dereference: under - otherwise it is redundant to check it against null. Signed-off-by:Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by:
Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Daniel Stone <daniel@fooishbar.org>
Showing
Please register or sign in to comment