From: Oliver Kurth Date: Mon, 15 Apr 2019 18:33:00 +0000 (-0700) Subject: Fix minor leak in FileRotateByRenumber - Coverity scan X-Git-Tag: stable-11.0.0~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85bc2e71dd7a855d3c533965859c1756deecc314;p=thirdparty%2Fopen-vm-tools.git Fix minor leak in FileRotateByRenumber - Coverity scan --- diff --git a/open-vm-tools/lib/file/file.c b/open-vm-tools/lib/file/file.c index 2d1154b38..7dae12c88 100644 --- a/open-vm-tools/lib/file/file.c +++ b/open-vm-tools/lib/file/file.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2018 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2019 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -2452,6 +2452,7 @@ FileRotateByRenumber(const char *filePath, // IN: full path to file File_GetPathName(fullPathNoExt, &baseDir, &baseName); if ((baseDir == NULL) || (*baseDir == '\0')) { + free(baseDir); baseDir = Unicode_Duplicate(DIRSEPS); }