This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] cygutils: Fix resource leak in get_short_paths


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=584c6643fea45b83a1ef258d9ab1c2ec491b3387

commit 584c6643fea45b83a1ef258d9ab1c2ec491b3387
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Thu Nov 24 16:04:42 2016 +0100

    cygutils: Fix resource leak in get_short_paths
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/utils/cygpath.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc
index 6ab98cd..ccae98f 100644
--- a/winsup/utils/cygpath.cc
+++ b/winsup/utils/cygpath.cc
@@ -414,6 +414,7 @@ get_short_paths (char *path)
       exit (1);
     }
   my_wcstombs (ptr, sbuf, len);
+  free (sbuf);
   return ptr;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]