Code

src/daemon/common.c: avoid leaking cap_header in error condition
authorMarc Fournier <marc.fournier@camptocamp.com>
Wed, 10 Aug 2016 20:42:23 +0000 (22:42 +0200)
committerMarc Fournier <marc.fournier@camptocamp.com>
Wed, 10 Aug 2016 20:42:23 +0000 (22:42 +0200)
src/daemon/common.c

index a522759cebf7437c6b4fb03e6698c156d2f6f86f..14503525d567cf2b33ba2008e4fdbe750f3a5d2e 100644 (file)
@@ -1688,6 +1688,7 @@ int check_capability (int capability) /* {{{ */
        if (cap_data == NULL)
        {
                ERROR("check_capability: calloc failed");
+               sfree(cap_header);
                return (-1);
        }