]> sourceware.org Git - lvm2.git/commit
libdm: make dm_stats_destroy(NULL) a no-op
authorBryn M. Reeves <bmr@redhat.com>
Fri, 10 Mar 2017 16:41:28 +0000 (16:41 +0000)
committerBryn M. Reeves <bmr@redhat.com>
Fri, 10 Mar 2017 16:41:28 +0000 (16:41 +0000)
commitd28a50ec76c62c48a3be695569fe5e752b9ae684
tree6895650ebb7fbcbe2f08df688903863781927e74
parent93644be44b4067c6ebc1d450589ca510129b3b60
libdm: make dm_stats_destroy(NULL) a no-op

Test for NULL in dm_stats_destroy() and return immediately if
the struct dm_stats pointer is NULL (similar to free(NULL)).

This simplifies cleanup code which otherwise needs to:

  out:
    if (dms)
        dm_stats_destroy(dms);
    return;
libdm/libdm-stats.c
This page took 0.029337 seconds and 5 git commands to generate.