1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

dmsetup: add missing checks for dm_stats_create() ret value

Coverity likes to see a check for dms not being NULL, so
add those missing ones...
This commit is contained in:
Zdenek Kabelac 2015-11-09 09:45:53 +01:00
parent e90c5d2060
commit 297d6773af
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.111 -
====================================
Add checks for failing dm_stats_create() in dmsetup.
Add missing fifo close when failed to initialize client connection.
Version 1.02.110 - 30th October 2015

View File

@ -4834,7 +4834,9 @@ static int _stats_create(CMD_ARGS)
if (_switches[AUX_DATA_ARG])
aux_data = _string_args[AUX_DATA_ARG];
dms = dm_stats_create(DM_STATS_PROGRAM_ID);
if (!(dms = dm_stats_create(DM_STATS_PROGRAM_ID)))
return_0;
if (!_bind_stats_device(dms, name))
goto_bad;
@ -4906,7 +4908,8 @@ static int _stats_delete(CMD_ARGS)
region_id = (uint64_t) _int_args[REGION_ID_ARG];
dms = dm_stats_create(program_id);
if (!(dms = dm_stats_create(program_id)))
return_0;
if (!_bind_stats_device(dms, name))
goto_out;
@ -4968,7 +4971,8 @@ static int _stats_print(CMD_ARGS)
region_id = (uint64_t) _int_args[REGION_ID_ARG];
dms = dm_stats_create(DM_STATS_PROGRAM_ID);
if (!(dms = dm_stats_create(DM_STATS_PROGRAM_ID)))
return_0;
if (!_bind_stats_device(dms, name))
goto_out;