projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3be3430
)
Dont free everytime getline() is used, fix from Stefan Soucek
author
Glenn L McGrath
<bug1@ihug.co.nz>
Sat, 22 Sep 2001 03:24:07 +0000
(
03:24
-0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Sat, 22 Sep 2001 03:24:07 +0000
(
03:24
-0000)
archival/dpkg.c
patch
|
blob
|
history
dpkg.c
patch
|
blob
|
history
diff --git
a/archival/dpkg.c
b/archival/dpkg.c
index 437b50d3b7914e360976ce4d65e028b439757bae..a97a5a29fdfde3c19f1daa6d812c7ea060cf3e8c 100644
(file)
--- a/
archival/dpkg.c
+++ b/
archival/dpkg.c
@@
-1042,11
+1042,10
@@
char **create_list(const char *filename)
*last_char = '\0';
}
file_list[count] = xstrdup(line);
- free(line);
count++;
- length = 0;
}
fclose(list_stream);
+ free(line);
if (count == 0) {
return(NULL);
diff --git
a/dpkg.c
b/dpkg.c
index 437b50d3b7914e360976ce4d65e028b439757bae..a97a5a29fdfde3c19f1daa6d812c7ea060cf3e8c 100644
(file)
--- a/
dpkg.c
+++ b/
dpkg.c
@@
-1042,11
+1042,10
@@
char **create_list(const char *filename)
*last_char = '\0';
}
file_list[count] = xstrdup(line);
- free(line);
count++;
- length = 0;
}
fclose(list_stream);
+ free(line);
if (count == 0) {
return(NULL);