|
|
604589 |
From f9dcf9c252d3d1cb76aebd838300bdf3e973e77b Mon Sep 17 00:00:00 2001
|
|
|
604589 |
From: Cathy Avery <cavery@redhat.com>
|
|
|
604589 |
Date: Thu, 25 Jul 2019 12:32:27 +0200
|
|
|
604589 |
Subject: [PATCH 04/16] Fix minor leak in FileRotateByRenumber - Coverity scan
|
|
|
604589 |
|
|
|
604589 |
RH-Author: Cathy Avery <cavery@redhat.com>
|
|
|
604589 |
Message-id: <20190725123239.18274-5-cavery@redhat.com>
|
|
|
604589 |
Patchwork-id: 89720
|
|
|
604589 |
O-Subject: [RHEL8.1 open-vm-tools PATCH 04/16] Fix minor leak in FileRotateByRenumber - Coverity scan
|
|
|
604589 |
Bugzilla: 1602648
|
|
|
604589 |
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
|
|
604589 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
604589 |
|
|
|
604589 |
commit 85bc2e71dd7a855d3c533965859c1756deecc314
|
|
|
604589 |
Author: Oliver Kurth <okurth@vmware.com>
|
|
|
604589 |
Date: Mon Apr 15 11:33:00 2019 -0700
|
|
|
604589 |
|
|
|
604589 |
Fix minor leak in FileRotateByRenumber - Coverity scan
|
|
|
604589 |
|
|
|
604589 |
Signed-off-by: Cathy Avery <cavery@redhat.com>
|
|
|
604589 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
604589 |
---
|
|
|
604589 |
open-vm-tools/lib/file/file.c | 3 ++-
|
|
|
604589 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
604589 |
|
|
|
604589 |
diff --git a/lib/file/file.c b/lib/file/file.c
|
|
|
604589 |
index 2d1154b..7dae12c 100644
|
|
|
604589 |
--- a/lib/file/file.c
|
|
|
604589 |
+++ b/lib/file/file.c
|
|
|
604589 |
@@ -1,5 +1,5 @@
|
|
|
604589 |
/*********************************************************
|
|
|
604589 |
- * Copyright (C) 1998-2018 VMware, Inc. All rights reserved.
|
|
|
604589 |
+ * Copyright (C) 1998-2019 VMware, Inc. All rights reserved.
|
|
|
604589 |
*
|
|
|
604589 |
* This program is free software; you can redistribute it and/or modify it
|
|
|
604589 |
* under the terms of the GNU Lesser General Public License as published
|
|
|
604589 |
@@ -2452,6 +2452,7 @@ FileRotateByRenumber(const char *filePath, // IN: full path to file
|
|
|
604589 |
File_GetPathName(fullPathNoExt, &baseDir, &baseName);
|
|
|
604589 |
|
|
|
604589 |
if ((baseDir == NULL) || (*baseDir == '\0')) {
|
|
|
604589 |
+ free(baseDir);
|
|
|
604589 |
baseDir = Unicode_Duplicate(DIRSEPS);
|
|
|
604589 |
}
|
|
|
604589 |
|
|
|
604589 |
--
|
|
|
604589 |
1.8.3.1
|
|
|
604589 |
|