{"thread":{"id":"83","subject":"[patch] fix for memory leak in write-tree.c","startedAt":"2005-04-17T11:21:56Z","lastAt":"2005-04-17T11:23:35Z","messageCount":2,"participants":["Brad Roberts","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"464","messageId":"Pine.LNX.4.44.0504170418390.2625-100000@bellevue.puremagic.com","threadId":"83","inReplyTo":null,"subject":"[patch] fix for memory leak in write-tree.c","fromName":"Brad Roberts","fromEmail":"braddr@puremagic.com","sentAt":"2005-04-17T11:21:56Z","receivedAt":"2005-04-17T11:21:56Z","isPatch":true,"sender":{"key":"braddr@puremagic.com","avatar":null},"body":"I've made my tree rsync'able:\n\nrsync://gameboy2.puremagic.com/git\n\n\ncommit 1cdbc0a19b8d9b68f1f42735e2f14f1289823a63\ntree 0e060fed0642337e675368913ec8d4f910a9f019\nparent 11ed64c1b141c9ba397a1ca76aef2cd250976007\nauthor Brad Roberts,,, <braddr@gameboy2> 1113736632 -0700\ncommitter Brad Roberts,,, <braddr@gameboy2> 1113736632 -0700\n\nFix a memory leak in write-tree.c, not freeing the directory buffer.\n\nIndex: write-tree.c\n===================================================================\n--- 51b1bddbbc05e50d5bbf1f9662e503c2e85d5e96/write-tree.c  (mode:100644 sha1:34a351b20fb38ea588f34bd9634f101b9dc533cb)\n+++ 0e060fed0642337e675368913ec8d4f910a9f019/write-tree.c  (mode:100644 sha1:fb046aa6ce6b9fce6a523a1e36ff43adab9bdd93)\n@@ -93,10 +93,8 @@\n        i -= 5;\n        memcpy(buffer+i, \"tree \", 5);\n\n-       buffer += i;\n-       offset -= i;\n-\n-       write_sha1_file(buffer, offset, returnsha1);\n+       write_sha1_file(buffer + i, offset - i, returnsha1);\n+       free(buffer);\n        return nr;\n }\n\n\n\n"},{"id":"465","messageId":"20050417112334.GA1487@pasky.ji.cz","threadId":"83","inReplyTo":"Pine.LNX.4.44.0504170418390.2625-100000@bellevue.puremagic.com","subject":"Re: fix for memory leak in write-tree.c","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-04-17T11:23:35Z","receivedAt":"2005-04-17T11:23:35Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Sun, Apr 17, 2005 at 01:21:56PM CEST, I got a letter\nwhere Brad Roberts <braddr@puremagic.com> told me that...\n> I've made my tree rsync'able:\n> \n> rsync://gameboy2.puremagic.com/git\n> \n> \n> commit 1cdbc0a19b8d9b68f1f42735e2f14f1289823a63\n> tree 0e060fed0642337e675368913ec8d4f910a9f019\n> parent 11ed64c1b141c9ba397a1ca76aef2cd250976007\n> author Brad Roberts,,, <braddr@gameboy2> 1113736632 -0700\n> committer Brad Roberts,,, <braddr@gameboy2> 1113736632 -0700\n\nIf we are supposed to merge with you, it would be nice if you used a\nreal email address. (The commas are livable but if you can get rid of\nthem... ;-)\n\nThanks,\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"}]}