ok fuck mem leak fixes
This commit is contained in:
parent
07e55ed75d
commit
55a8a0e81b
1 changed files with 1 additions and 4 deletions
5
rsudo.c
5
rsudo.c
|
@ -46,9 +46,6 @@ char *join(char *s1, char *s2) {
|
||||||
strcpy(result, s1);
|
strcpy(result, s1);
|
||||||
strcat(result, s2);
|
strcat(result, s2);
|
||||||
}
|
}
|
||||||
free(s1);
|
|
||||||
free(s2);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +117,7 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
char *tot = malloc(1);
|
char *tot = malloc(1);
|
||||||
*tot = 0;
|
*tot = 0;
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc - 1; i++) {
|
||||||
char *arg = argv[i];
|
char *arg = argv[i];
|
||||||
tot = join(tot, arg);
|
tot = join(tot, arg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue