mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-04-11 08:21:29 -04:00
cursor: remove unnecessary if before free
free(NULL) is valid and is a no-op. Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
parent
92e758834c
commit
450bb7c145
1 changed files with 3 additions and 7 deletions
|
|
@ -234,8 +234,7 @@ XcursorImagesDestroy(XcursorImages *images)
|
||||||
|
|
||||||
for (n = 0; n < images->nimage; n++)
|
for (n = 0; n < images->nimage; n++)
|
||||||
XcursorImageDestroy(images->images[n]);
|
XcursorImageDestroy(images->images[n]);
|
||||||
if (images->name)
|
free(images->name);
|
||||||
free(images->name);
|
|
||||||
free(images);
|
free(images);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -253,8 +252,7 @@ XcursorImagesSetName(XcursorImages *images, const char *name)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
strcpy(new, name);
|
strcpy(new, name);
|
||||||
if (images->name)
|
free(images->name);
|
||||||
free(images->name);
|
|
||||||
images->name = new;
|
images->name = new;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -911,8 +909,6 @@ xcursor_load_theme(const char *theme, int size,
|
||||||
for (i = inherits; i; i = _XcursorNextPath(i))
|
for (i = inherits; i; i = _XcursorNextPath(i))
|
||||||
xcursor_load_theme(i, size, load_callback, user_data);
|
xcursor_load_theme(i, size, load_callback, user_data);
|
||||||
|
|
||||||
if (inherits)
|
free(inherits);
|
||||||
free(inherits);
|
|
||||||
|
|
||||||
free(xcursor_path);
|
free(xcursor_path);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue