]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/format-table: fix invalid free
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 9 Jul 2021 11:17:16 +0000 (13:17 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 9 Jul 2021 11:17:16 +0000 (13:17 +0200)
Coverity CID#1458108.

src/shared/format-table.c

index 1c28fa73fa73f81fbbd7e89da1917e243b76f9f3..b298019d7cf746c195e0ac6660fa31098c980638 100644 (file)
@@ -1763,7 +1763,7 @@ static const char *table_data_format(Table *t, TableData *d, bool avoid_uppercas
         }
 
         case TABLE_MODE: {
-                _cleanup_free_ char *p;
+                _cleanup_free_ char *p = NULL;
 
                 if (d->mode == MODE_INVALID)
                         return "n/a";