]> granicus.if.org Git - transmission/commitdiff
(trunk, libT) #5583 'blockfile.tmp file descriptor is leaked when importing blocklist...
authorJordan Lee <jordan@transmissionbt.com>
Sun, 19 Jan 2014 02:03:41 +0000 (02:03 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Sun, 19 Jan 2014 02:03:41 +0000 (02:03 +0000)
libtransmission/rpcimpl.c

index f55d136e6d212ef8eb2d39ecb6da329469c5f23b..e71fb45dffe3470491d98db155fd27bedbfc00e9 100644 (file)
@@ -1542,6 +1542,8 @@ gotNewBlocklist (tr_session       * session,
         if (write (fd, response, response_byte_count) < 0)
           tr_snprintf (result, sizeof (result), _("Couldn't save file \"%1$s\": %2$s"), filename, tr_strerror (errno));
 
+      tr_close_file(fd);
+
       if (*result)
         {
           tr_logAddError ("%s", result);