projects
/
ppastats.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
memleak and make valgrind happy
[ppastats.git]
/
src
/
lp.c
diff --git
a/src/lp.c
b/src/lp.c
index
47d024e
..
67e6ed5
100644
(file)
--- a/
src/lp.c
+++ b/
src/lp.c
@@
-91,14
+91,18
@@
struct bpph *bpph_new(const char *binary_package_name,
void bpph_list_free(struct bpph **list)
{
void bpph_list_free(struct bpph **list)
{
- struct bpph **
l_cur = list
;
+ struct bpph **
cur
;
- while (*l_cur) {
- bpph_free(*l_cur);
- l_cur++;
- }
+ if (list) {
+ cur = list;
- free(list);
+ while (*cur) {
+ bpph_free(*cur);
+ cur++;
+ }
+
+ free(list);
+ }
}
char *get_archive_url(const char *owner, const char *ppa)
}
char *get_archive_url(const char *owner, const char *ppa)
@@
-150,10
+154,13
@@
void distro_arch_series_free(struct distro_arch_series *d)
void distro_arch_series_list_free(struct distro_arch_series **list)
{
void distro_arch_series_list_free(struct distro_arch_series **list)
{
+ struct distro_arch_series **cur;
+
if (list) {
if (list) {
- while (*list) {
- distro_arch_series_free(*list);
- list++;
+ cur = list;
+ while (*cur) {
+ distro_arch_series_free(*cur);
+ cur++;
}
free(list);
}
}
free(list);
}
@@
-237,7
+244,7
@@
int ddts_length(struct daily_download_total **ddts)
return n;
}
return n;
}
-st
atic st
ruct daily_download_total *ddt_clone(struct daily_download_total *ddt)
+struct daily_download_total *ddt_clone(struct daily_download_total *ddt)
{
struct daily_download_total *new;
{
struct daily_download_total *new;
@@
-249,7
+256,7
@@
static struct daily_download_total *ddt_clone(struct daily_download_total *ddt)
return new;
}
return new;
}
-st
atic st
ruct daily_download_total **
+struct daily_download_total **
ddts_clone(struct daily_download_total **ddts)
{
int n, i;
ddts_clone(struct daily_download_total **ddts)
{
int n, i;