E17: free the string after copying, not before

reported by Maxime Villard

SVN revision: 75717
This commit is contained in:
Vincent Torri 2012-08-26 21:34:25 +00:00
parent 837d3fa390
commit f17997b7cc
1 changed files with 1 additions and 1 deletions

View File

@ -344,8 +344,8 @@ _upload_data_cb(void *data __UNUSED__, int ev_type __UNUSED__, void *event)
n = malloc(strlen(url_ret) + ev->size + 1);
if (n)
{
free(url_ret);
strcpy(n, url_ret);
free(url_ret);
strcat(n, txt);
url_ret = n;
}