From e3bc6666d6d5bd8922ca10652a2d04577357fa71 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 11 Oct 2007 23:17:53 +0000 Subject: malloc data size, not pointer size --- src/librc-daemon.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/librc-daemon.c') diff --git a/src/librc-daemon.c b/src/librc-daemon.c index 112f4c9c..80e5b162 100644 --- a/src/librc-daemon.c +++ b/src/librc-daemon.c @@ -311,21 +311,21 @@ bool rc_service_daemon_set (const char *service, const char *exec, if (exec) { i = strlen (exec) + 6; - mexec = xmalloc (sizeof (char *) * i); + mexec = xmalloc (sizeof (char) * i); snprintf (mexec, i, "exec=%s", exec); } else mexec = xstrdup ("exec="); if (name) { i = strlen (name) + 6; - mname = xmalloc (sizeof (char *) * i); + mname = xmalloc (sizeof (char) * i); snprintf (mname, i, "name=%s", name); } else mname = xstrdup ("name="); if (pidfile) { i = strlen (pidfile) + 9; - mpidfile = xmalloc (sizeof (char *) * i); + mpidfile = xmalloc (sizeof (char) * i); snprintf (mpidfile, i, "pidfile=%s", pidfile); } else mpidfile = xstrdup ("pidfile="); @@ -404,11 +404,11 @@ bool rc_service_started_daemon (const char *service, const char *exec, free (svc); i = strlen (exec) + 6; - mexec = xmalloc (sizeof (char *) * i); + mexec = xmalloc (sizeof (char) * i); snprintf (mexec, i, "exec=%s", exec); if (indx > 0) { - int len = sizeof (char *) * 10; + int len = sizeof (char) * 10; file = xmalloc (len); snprintf (file, len, "%03d", indx); retval = _match_daemon (dirpath, file, mexec, NULL, NULL); -- cgit v1.2.3