From: Zbigniew Jędrzejewski-Szmek Date: Fri, 9 Jul 2021 11:17:16 +0000 (+0200) Subject: shared/format-table: fix invalid free X-Git-Tag: v250-rc1~966^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fe819f569a7ebcde0a0d0d7c091c742579b28b55;p=thirdparty%2Fsystemd.git shared/format-table: fix invalid free Coverity CID#1458108. --- diff --git a/src/shared/format-table.c b/src/shared/format-table.c index 1c28fa73fa7..b298019d7cf 100644 --- a/src/shared/format-table.c +++ b/src/shared/format-table.c @@ -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";