summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-08-22 02:51:32 +0000
committerGerald Carter <jerry@samba.org>2002-08-22 02:51:32 +0000
commit7c4d1ba0581dfd152a876f8726124938515410bd (patch)
tree0bdef0cebb89c43ac3ed2c29df46c4e7b20537a8 /source3/lib
parenta1e32fee3957d0566a4c089dd5750541c15c843f (diff)
downloadsamba-7c4d1ba0581dfd152a876f8726124938515410bd.tar.gz
samba-7c4d1ba0581dfd152a876f8726124938515410bd.tar.bz2
samba-7c4d1ba0581dfd152a876f8726124938515410bd.zip
fix a few segfaults
(This used to be commit ccb02f7cfcec4a555cf7304816c739f4bf7b46f0)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/system.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 8822d3c414..873b8737d5 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1233,23 +1233,23 @@ int sys_dup2(int oldfd, int newfd)
Wrapper for Admin Logs.
****************************************************************************/
-void sys_adminlog(int priority, const char *format_str, ...)
+void sys_adminlog(int priority, char *format_str, ...)
{
va_list ap;
int ret;
- char **msgbuf = NULL;
+ char *msgbuf = NULL;
va_start( ap, format_str );
- ret = vasprintf( msgbuf, format_str, ap );
+ ret = vasprintf( &msgbuf, format_str, ap );
va_end( ap );
if (ret == -1)
return;
#if defined(HAVE_SYSLOG)
- syslog( priority, "%s", *msgbuf );
+ syslog( priority, "%s", msgbuf );
#else
- DEBUG(0,("%s", *msgbuf ));
+ DEBUG(0,("%s", msgbuf ));
#endif
- SAFE_FREE(*msgbuf);
+ SAFE_FREE(msgbuf);
}