Skip to content

Commit

Permalink
Fixed a minor memory leak
Browse files Browse the repository at this point in the history
Buffer returned by Dir_CurrentPath() must always
be freed.
  • Loading branch information
skyjake committed Jan 3, 2012
1 parent a566da0 commit cb4f869
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doomsday/engine/portable/src/fs_util.c
Expand Up @@ -420,8 +420,10 @@ boolean F_PrependWorkPath(ddstring_t* dst, const ddstring_t* src)

if(!F_IsAbsolute(src))
{
Str_Prepend(dst, Dir_CurrentPath());
char* curPath = Dir_CurrentPath();
Str_Prepend(dst, curPath);
Dir_CleanPathStr(dst);
free(curPath);
return true;
}

Expand Down

0 comments on commit cb4f869

Please sign in to comment.