mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
dtexec,DtSvc/MsgLog.c: coverity CID 89585; resource leak
This commit is contained in:
parent
adb0acbaf5
commit
5729327cc8
1 changed files with 7 additions and 6 deletions
|
@ -141,7 +141,7 @@ static char * get_file_name (
|
||||||
const char * format,
|
const char * format,
|
||||||
... )
|
... )
|
||||||
{
|
{
|
||||||
char *file, *rtn;
|
char *file;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
file = malloc(MAXPATHLEN+1);
|
file = malloc(MAXPATHLEN+1);
|
||||||
|
@ -153,11 +153,12 @@ static char * get_file_name (
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
if ((*fp = fopen (file, type)) == NULL)
|
if ((*fp = fopen (file, type)) == NULL)
|
||||||
return (NULL);
|
{
|
||||||
|
|
||||||
rtn = strdup (file);
|
|
||||||
free(file);
|
free(file);
|
||||||
return rtn;
|
return (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue