From: Ray Strode Date: Thu, 28 Dec 2023 16:51:09 +0000 (-0500) Subject: ply-console-viewer: Make free function NULL safe X-Git-Tag: 24.004.60~16^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4759a7766f2d298471c0169df9b4594ed75bdfc;p=thirdparty%2Fplymouth.git ply-console-viewer: Make free function NULL safe --- diff --git a/src/libply-splash-graphics/ply-console-viewer.c b/src/libply-splash-graphics/ply-console-viewer.c index 9b7968fe..fe25089d 100644 --- a/src/libply-splash-graphics/ply-console-viewer.c +++ b/src/libply-splash-graphics/ply-console-viewer.c @@ -147,6 +147,9 @@ ply_console_viewer_free (ply_console_viewer_t *console_viewer) ply_list_node_t *node; ply_label_t *console_message_label; + if (console_viewer == NULL) + return; + ply_list_foreach (console_viewer->message_labels, node) { console_message_label = ply_list_node_get_data (node); ply_label_free (console_message_label);