mirror of
https://github.com/pygos/pkg-utils.git
synced 2024-11-22 04:49:46 +01:00
Fix file list removal of input line
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
bba2e4c536
commit
19e2f8aa8c
1 changed files with 2 additions and 1 deletions
|
@ -17,6 +17,7 @@ static image_entry_t *filelist_mkentry(char *line, const char *filename,
|
||||||
size_t linenum, mode_t filetype)
|
size_t linenum, mode_t filetype)
|
||||||
{
|
{
|
||||||
image_entry_t *ent;
|
image_entry_t *ent;
|
||||||
|
char *start = line;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
ent = calloc(1, sizeof(*ent));
|
ent = calloc(1, sizeof(*ent));
|
||||||
|
@ -117,7 +118,7 @@ static image_entry_t *filelist_mkentry(char *line, const char *filename,
|
||||||
line = skipspace(line);
|
line = skipspace(line);
|
||||||
|
|
||||||
/* remove processed data */
|
/* remove processed data */
|
||||||
memmove(line, line, strlen(line) + 1);
|
memmove(start, line, strlen(line) + 1);
|
||||||
return ent;
|
return ent;
|
||||||
fail:
|
fail:
|
||||||
free(ent->name);
|
free(ent->name);
|
||||||
|
|
Loading…
Reference in a new issue