Coverity CID 1757: Don't leak memory

This commit is contained in:
christos 2006-03-26 22:04:14 +00:00
parent 4820f3f28c
commit f3acb4a69b
1 changed files with 3 additions and 2 deletions

5
dist/cdk/cdk.c vendored
View File

@ -2,8 +2,8 @@
/*
* $Author: christos $
* $Date: 2006/03/26 22:02:59 $
* $Revision: 1.4 $
* $Date: 2006/03/26 22:04:14 $
* $Revision: 1.5 $
*/
char *GPasteBuffer = 0;
@ -1217,6 +1217,7 @@ char *dirName (char *pathname)
/* Now dir either has nothing or the basename. */
if (dir[0] == '\0')
{
freeChar (dir);
/* If it has nothing, return nothing. */
return copyChar ("");
}