Skip to content

Commit

Permalink
fixed segmentation fault in case of a broken connection
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed May 24, 2024
1 parent 1511a13 commit d4f1adb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wlancap2wpasec.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ if(curl)
ret = remove(sendcapname);
if(ret != 0) fprintf(stdout, "couldn't remove %s\n", sendcapname);
}
free(curlmem->response);
}
else
{
Expand All @@ -125,7 +126,6 @@ if(curl)
fprintf(stderr, "\n\x1B[31mupload to %s failed: %s\x1B[0m\n\n", wpasecurl, curl_easy_strerror(res));
uploadflag = false;
}
if(curlmem->response != NULL) free(curlmem->response);
curl_easy_cleanup(curl);
curl_mime_free(mime);
curl_slist_free_all(headerlist);
Expand Down

0 comments on commit d4f1adb

Please sign in to comment.