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

index 50495efb993d639a92c66420777648ee81aaef58..54bddcbdaef09a54a8914d67d46e92ba86f323df 100644 (file)
@@ -3853,7 +3853,10 @@ ResolveSnref(
                                        my_struct->ui_info->client_data,
                                        interpStr, runData, &newData)
                        || NULL == newData || 0 == strlen(newData))
+                 {
+                   free(newData);
                    return NULL;
+                 }
 
                /*
                 * set the match data for toss lookup
@@ -3876,7 +3879,10 @@ ResolveSnref(
                if (0 != MySaveString(&newSeg, my_struct, newData,
                                        my_struct->cur_link, my_struct->mb_len,
                                        False))
+                 {
+                   free(newData);
                    return NULL;
+                 }
 
                free(newData);
              }