X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/blobdiff_plain/6c50dc9249a1abaee3d737a499833718be2e6e0a..b73d1009d4a3494951c129e49f50f8b4c795deb1:/src/fileLib.c diff --git a/src/fileLib.c b/src/fileLib.c index ea08927..ec108b0 100644 --- a/src/fileLib.c +++ b/src/fileLib.c @@ -220,8 +220,10 @@ cstring fileLib_cleanName (cstring s) { if (cstring_equalPrefixLit (s, "./")) { - return cstring_copySegment (s, 2, cstring_length (s) - 1); + cstring res = cstring_copySegment (s, 2, cstring_length (s) - 1); + cstring_free (s); + return res; } - return cstring_copy (s); + return s; }