mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-15 17:47:09 +00:00
use free instead of free_and_zero (it's not available in this branch and zero-ing is not necessary here)
This commit is contained in:
parent
9932a975e2
commit
6c750d09f2
12
src/top.c
12
src/top.c
@ -880,22 +880,22 @@ int parse_top_args(const char *s, const char *arg, struct text_object *obj)
|
||||
#else /* IOSTATS */
|
||||
NORM_ERR("must be one of: name, cpu, pid, mem, time, mem_res, mem_vsize");
|
||||
#endif /* IOSTATS */
|
||||
free_and_zero(td->s);
|
||||
free_and_zero(obj->data.opaque);
|
||||
free(td->s);
|
||||
free(obj->data.opaque);
|
||||
return 0;
|
||||
}
|
||||
if (n < 1 || n > 10) {
|
||||
NORM_ERR("invalid num arg for top. Must be between 1 and 10.");
|
||||
free_and_zero(td->s);
|
||||
free_and_zero(obj->data.opaque);
|
||||
free(td->s);
|
||||
free(obj->data.opaque);
|
||||
return 0;
|
||||
} else {
|
||||
td->num = n - 1;
|
||||
}
|
||||
} else {
|
||||
NORM_ERR("invalid argument count for top");
|
||||
free_and_zero(td->s);
|
||||
free_and_zero(obj->data.opaque);
|
||||
free(td->s);
|
||||
free(obj->data.opaque);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user