aboutsummaryrefslogtreecommitdiff
path: root/src/rc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc.c')
-rw-r--r--src/rc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/rc.c b/src/rc.c
index 2ae3d560..c84c49e5 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -359,11 +359,12 @@ static int do_options (int argc, char **argv)
eerrorx ("%s: no option specified", applet);
if (strcmp (applet, "get_options") == 0) {
- char buffer[1024];
- memset (buffer, 0, 1024);
- ok = rc_get_service_option (service, argv[0], buffer);
- if (ok)
- printf ("%s", buffer);
+ char *option = rc_get_service_option (service, argv[0]);
+ if (option) {
+ printf ("%s", option);
+ free (option);
+ ok = true;
+ }
} else if (strcmp (applet, "save_options") == 0)
ok = rc_set_service_option (service, argv[0], argv[1]);
else