]> git.proxmox.com Git - pve-cluster.git/commitdiff
pmxcfs: don't warn when calling destructors with NULL
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 1 Jun 2017 07:34:34 +0000 (09:34 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 1 Jun 2017 07:35:58 +0000 (09:35 +0200)
Similar to free() & friends, destructors should simply
return in that case.

data/src/memdb.c

index 56044b4b1a1bfecb9a84012265c8a90e559f87f5..1b6a631521c5c429bd626b9a7e3e2afae1dfe16d 100644 (file)
@@ -85,7 +85,8 @@ void
 memdb_tree_entry_free(
        memdb_tree_entry_t *te)
 {
-       g_return_if_fail(te != NULL);
+       if (!te)
+               return;
 
        if (te->type == DT_REG) {
                if (te->data.value)