diff --git a/cde/lib/DtHelp/AccessSDL.c b/cde/lib/DtHelp/AccessSDL.c index 8d6d470fc..1ba55565a 100644 --- a/cde/lib/DtHelp/AccessSDL.c +++ b/cde/lib/DtHelp/AccessSDL.c @@ -1381,8 +1381,11 @@ _DtHelpCeGetSdlDocStamp( if (ret_time != NULL) *ret_time = timestamp; - if (result == 0 && (docId == NULL || timestamp == NULL)) + if (result == 0 && (docId == NULL || timestamp == NULL)) { + free(docId); /* Incase only one of them is NULL */ + free(timestamp); /* " */ return -1; + } return result; }