{"thread":{"id":"11658","subject":"[PATCH] http-push: fix double free()","startedAt":"2008-01-17T19:45:11Z","lastAt":"2008-01-18T14:54:47Z","messageCount":4,"participants":["Johannes Schindelin","Mike Hommey"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"65769","messageId":"alpine.LSU.1.00.0801171943360.5731@racer.site","threadId":"11658","inReplyTo":null,"subject":"[PATCH] http-push: fix double free()","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-17T19:45:11Z","receivedAt":"2008-01-17T19:45:11Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nThere was an extra free(url) in remote_exists() (both if clauses before \nthat contain a free(url) already), which resulted in a crash on Windows.\n\nNoticed by Nigel Magnay.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tThis fixes Issue 71 of msysGit, as far as I can tell.\n\n http-push.c |    1 -\n 1 files changed, 0 insertions(+), 1 deletions(-)\n\ndiff --git a/http-push.c b/http-push.c\nindex 64be904..a78e0a9 100644\n--- a/http-push.c\n+++ b/http-push.c\n@@ -1991,7 +1991,6 @@ static int remote_exists(const char *path)\n \t\tfprintf(stderr, \"Unable to start HEAD request\\n\");\n \t}\n \n-\tfree(url);\n \treturn ret;\n }\n \n-- \n1.5.3.6.2304.gbc8e45-dirty\n"},{"id":"65868","messageId":"20080118063417.GB22089@glandium.org","threadId":"11658","inReplyTo":"alpine.LSU.1.00.0801171943360.5731@racer.site","subject":"Re: [PATCH] http-push: fix double free()","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-01-18T06:34:17Z","receivedAt":"2008-01-18T06:34:17Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Thu, Jan 17, 2008 at 07:45:11PM +0000, Johannes Schindelin wrote:\n> \n> There was an extra free(url) in remote_exists() (both if clauses before \n> that contain a free(url) already), which resulted in a crash on Windows.\n\nMmmmmm the free(url) you remove has been added in 3a462bc9 and the\nfree(url) in the if clauses before have been removed in the same commit.\nI fail to see how that could lead to a double free().\n\nActually, I do see how, because git show 64be904 displays an obviously\nwrong remote_exists. OTOH, neither next, master nor pu have such code...\n\nMike\n"},{"id":"65863","messageId":"alpine.LSU.1.00.0801181213220.5731@racer.site","threadId":"11658","inReplyTo":"20080118063417.GB22089@glandium.org","subject":"Re: [PATCH] http-push: fix double free()","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-18T12:14:48Z","receivedAt":"2008-01-18T12:14:48Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 18 Jan 2008, Mike Hommey wrote:\n\n> On Thu, Jan 17, 2008 at 07:45:11PM +0000, Johannes Schindelin wrote:\n> > \n> > There was an extra free(url) in remote_exists() (both if clauses \n> > before that contain a free(url) already), which resulted in a crash on \n> > Windows.\n> \n> Mmmmmm the free(url) you remove has been added in 3a462bc9 and the \n> free(url) in the if clauses before have been removed in the same commit. \n> I fail to see how that could lead to a double free().\n> \n> Actually, I do see how, because git show 64be904 displays an obviously \n> wrong remote_exists. OTOH, neither next, master nor pu have such code...\n\nAh, sorry.  I was working on an old git branch, it seems.  Will try with a \nnewer one (to see if issue 71 persists).\n\nCiao,\nDscho\n"},{"id":"65883","messageId":"alpine.LSU.1.00.0801181454400.5731@racer.site","threadId":"11658","inReplyTo":"20080118063417.GB22089@glandium.org","subject":"Re: [PATCH] http-push: fix double free()","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-18T14:54:47Z","receivedAt":"2008-01-18T14:54:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 18 Jan 2008, Mike Hommey wrote:\n\n> On Thu, Jan 17, 2008 at 07:45:11PM +0000, Johannes Schindelin wrote:\n> > \n> > There was an extra free(url) in remote_exists() (both if clauses before \n> > that contain a free(url) already), which resulted in a crash on Windows.\n> \n> Mmmmmm the free(url) you remove has been added in 3a462bc9 and the \n> free(url) in the if clauses before have been removed in the same commit. \n> I fail to see how that could lead to a double free().\n\nYes, I confirm that my \"fix\" is wrong, because it was based on an \n_obsolete_ source tree.  Git-1.5.4-rc3-preview20080113.exe of msysGit \nappears not to have a problem with HTTP pushing.\n\nSorry for the noise,\nDscho\n"}]}