mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-30 17:18:21 +03:00
libdm: check if passed return pointer is not NULL
Coverity: before storing return value, check passed space will not dereference NULL pointer.
This commit is contained in:
parent
dd9a05b5ae
commit
422c7474ca
@ -2692,13 +2692,15 @@ static const char *_tok_value_string_list(const struct dm_report_field_type *ft,
|
||||
dm_free(arr);
|
||||
out:
|
||||
*end = s;
|
||||
*sel_str_list = ssl;
|
||||
if (*sel_str_list)
|
||||
*sel_str_list = ssl;
|
||||
return s;
|
||||
bad:
|
||||
*end = s;
|
||||
if (ssl)
|
||||
dm_pool_free(mem, ssl);
|
||||
*sel_str_list = NULL;
|
||||
if (*sel_str_list)
|
||||
*sel_str_list = NULL;
|
||||
return s;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user