Skip to content

Commit 1e1c191

Browse files
committed
Free memory allocated by dau1CheckFileName
1 parent 79e0bb9 commit 1e1c191

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

hdsNew.c

+7
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,13 @@ hdsNew(const char *file_str,
208208
}
209209
}
210210

211+
/* Free fname allocated by dau1CheckFileName. Set to NULL in case
212+
the CLEANUP block runs so that we don't try to free it twice? */
213+
if (fname) {
214+
MEM_FREE(fname);
215+
fname = NULL;
216+
}
217+
211218
/* Return the locator */
212219
if (*status == SAI__OK) {
213220
*locator = thisloc;

0 commit comments

Comments
 (0)