mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-29 05:12:41 +00:00
convert cmdline_to_pid to callbacks.free
This commit is contained in:
parent
ede0838e17
commit
87472a3daa
@ -858,6 +858,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
|||||||
END OBJ_ARG(cmdline_to_pid, 0, "cmdline_to_pid needs a command line as argument")
|
END OBJ_ARG(cmdline_to_pid, 0, "cmdline_to_pid needs a command line as argument")
|
||||||
scan_cmdline_to_pid_arg(obj, arg, free_at_crash);
|
scan_cmdline_to_pid_arg(obj, arg, free_at_crash);
|
||||||
obj->callbacks.print = &print_cmdline_to_pid;
|
obj->callbacks.print = &print_cmdline_to_pid;
|
||||||
|
obj->callbacks.free = &gen_free_opaque;
|
||||||
END OBJ_ARG(pid_chroot, 0, "pid_chroot needs a pid as argument")
|
END OBJ_ARG(pid_chroot, 0, "pid_chroot needs a pid as argument")
|
||||||
extract_object_args_to_sub(obj, arg);
|
extract_object_args_to_sub(obj, arg);
|
||||||
obj->callbacks.print = &print_pid_chroot;
|
obj->callbacks.print = &print_pid_chroot;
|
||||||
@ -1774,9 +1775,6 @@ void free_text_objects(struct text_object *root, int internal)
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (obj->type) {
|
switch (obj->type) {
|
||||||
case OBJ_cmdline_to_pid:
|
|
||||||
free(data.s);
|
|
||||||
break;
|
|
||||||
case OBJ_format_time:
|
case OBJ_format_time:
|
||||||
case OBJ_pid_environ:
|
case OBJ_pid_environ:
|
||||||
case OBJ_pid_chroot:
|
case OBJ_pid_chroot:
|
||||||
|
Loading…
Reference in New Issue
Block a user