Commit b01e29ef authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

xkb: Don't check for NULL before calling free

Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Jul 22 11:34:54 2010 +0300 xkb: Don't check for NULL before calling free Signed-off-by: 's avatarPauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: 's avatarPeter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent 90b83a79
...@@ -209,8 +209,7 @@ char tmpname[PATH_MAX]; ...@@ -209,8 +209,7 @@ char tmpname[PATH_MAX];
} }
if (!in) if (!in)
{ {
if (buf != NULL) free (buf);
free (buf);
#ifdef WIN32 #ifdef WIN32
unlink(tmpname); unlink(tmpname);
#endif #endif
...@@ -276,8 +275,7 @@ char tmpname[PATH_MAX]; ...@@ -276,8 +275,7 @@ char tmpname[PATH_MAX];
fclose(in); fclose(in);
unlink(tmpname); unlink(tmpname);
#endif #endif
if (buf != NULL) free (buf);
free (buf);
return status; return status;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment