subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1646620 - /subversion/trunk/subversion/libsvn_subr/sysinfo.c
Date Fri, 19 Dec 2014 03:36:41 GMT
Author: hwright
Date: Fri Dec 19 03:36:41 2014
New Revision: 1646620

URL: http://svn.apache.org/r1646620
Log:
Fix memory leak on MacOS platforms.

* subversion/libsvn_subr/sysinfo.c
  (system_version_plist): Release the CFMutableDataRef if returning early.

Modified:
    subversion/trunk/subversion/libsvn_subr/sysinfo.c

Modified: subversion/trunk/subversion/libsvn_subr/sysinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sysinfo.c?rev=1646620&r1=1646619&r2=1646620&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sysinfo.c Fri Dec 19 03:36:41 2014
@@ -940,6 +940,7 @@ system_version_plist(svn_boolean_t *serv
       if (!APR_STATUS_IS_ENOENT(err->apr_err))
         {
           svn_error_clear(err);
+          CFRelease(resource);
           return NULL;
         }
       else
@@ -950,6 +951,7 @@ system_version_plist(svn_boolean_t *serv
           if (err)
             {
               svn_error_clear(err);
+              CFRelease(resource);
               return NULL;
             }
 



Mime
View raw message