mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-04 09:18:36 +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:
parent
e90c5d2060
commit
297d6773af
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.111 -
|
Version 1.02.111 -
|
||||||
====================================
|
====================================
|
||||||
|
Add checks for failing dm_stats_create() in dmsetup.
|
||||||
Add missing fifo close when failed to initialize client connection.
|
Add missing fifo close when failed to initialize client connection.
|
||||||
|
|
||||||
Version 1.02.110 - 30th October 2015
|
Version 1.02.110 - 30th October 2015
|
||||||
|
@ -4834,7 +4834,9 @@ static int _stats_create(CMD_ARGS)
|
|||||||
if (_switches[AUX_DATA_ARG])
|
if (_switches[AUX_DATA_ARG])
|
||||||
aux_data = _string_args[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))
|
if (!_bind_stats_device(dms, name))
|
||||||
goto_bad;
|
goto_bad;
|
||||||
|
|
||||||
@ -4906,7 +4908,8 @@ static int _stats_delete(CMD_ARGS)
|
|||||||
|
|
||||||
region_id = (uint64_t) _int_args[REGION_ID_ARG];
|
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))
|
if (!_bind_stats_device(dms, name))
|
||||||
goto_out;
|
goto_out;
|
||||||
@ -4968,7 +4971,8 @@ static int _stats_print(CMD_ARGS)
|
|||||||
|
|
||||||
region_id = (uint64_t) _int_args[REGION_ID_ARG];
|
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))
|
if (!_bind_stats_device(dms, name))
|
||||||
goto_out;
|
goto_out;
|
||||||
|
Loading…
Reference in New Issue
Block a user