libDtHelp: Cov 88240
authorPeter Howkins <flibble@users.sf.net>
Sat, 11 Aug 2018 00:03:23 +0000 (01:03 +0100)
committerPeter Howkins <flibble@users.sf.net>
Sat, 11 Aug 2018 00:03:23 +0000 (01:03 +0100)
cde/lib/DtHelp/FormatCCDF.c

index 1fb4eb8c30e681d9613c9888b628af5862f34284..c053d736e7b42709db66f6ad8404d53f2c24d581 100644 (file)
@@ -684,7 +684,11 @@ AllocateSegments (
        priv = (FrmtPrivateInfo *) realloc ((void *) priv,
                                        sizeof(FrmtPrivateInfo) * new_size);
        if (NULL == priv)
+         {
+           free(p_seg);
+           p_seg = NULL;
            return NULL;
+         }
 
        /*
         * reattach the private information with their segments.