Browse Source

Fix missing free in sh file completion

K. Lange 4 years ago
parent
commit
896b5ba877
1 changed files with 1 additions and 0 deletions
  1. 1 0
      apps/sh.c

+ 1 - 0
apps/sh.c

@@ -385,6 +385,7 @@ void tab_complete_func(rline_context_t * c) {
 						char * x = malloc(strlen(tmp) + 1 + strlen(ent->d_name) + 1);
 						sprintf(x,"%s/%s",tmp,ent->d_name);
 						lstat(x, &statbuf);
+						free(x);
 					} else {
 						lstat(ent->d_name, &statbuf);
 					}