ok fuck mem leak fixes

This commit is contained in:
ArsenArsen 2017-12-08 02:31:40 +01:00
parent 07e55ed75d
commit 55a8a0e81b
No known key found for this signature in database
GPG Key ID: 683D2F43B0CA4BD2
1 changed files with 1 additions and 4 deletions

View File

@ -46,9 +46,6 @@ char *join(char *s1, char *s2) {
strcpy(result, s1);
strcat(result, s2);
}
free(s1);
free(s2);
return result;
}
@ -120,7 +117,7 @@ int main(int argc, char **argv) {
char *tot = malloc(1);
*tot = 0;
for (int i = 1; i < argc; i++) {
for (int i = 1; i < argc - 1; i++) {
char *arg = argv[i];
tot = join(tot, arg);