diff options
author | Günther Deschner <gd@samba.org> | 2008-11-15 02:23:31 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-11-15 02:25:17 +0100 |
commit | caf0c17e247b7c66051abc9ed239506a4be6aecc (patch) | |
tree | b7c7d1a62b00d7297f9244e978550c4af861a37e /source3/rpc_server | |
parent | df21095ce8981827767e8646b6aefb053beb29a8 (diff) | |
download | samba-caf0c17e247b7c66051abc9ed239506a4be6aecc.tar.gz samba-caf0c17e247b7c66051abc9ed239506a4be6aecc.tar.bz2 samba-caf0c17e247b7c66051abc9ed239506a4be6aecc.zip |
s3-spoolss: fix enumports segfault (another malloc vs. talloc candidate).
Guenther
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 577f7f1ded..59c1323a0f 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -7482,11 +7482,11 @@ WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines ) /* if no hook then just fill in the default port */ if ( !*cmd ) { - if (!(qlines = SMB_MALLOC_ARRAY( char*, 2 ))) { + if (!(qlines = TALLOC_ARRAY( NULL, char*, 2 ))) { return WERR_NOMEM; } - if (!(qlines[0] = SMB_STRDUP( SAMBA_PRINTER_PORT_NAME ))) { - SAFE_FREE(qlines); + if (!(qlines[0] = talloc_strdup(qlines, SAMBA_PRINTER_PORT_NAME ))) { + TALLOC_FREE(qlines); return WERR_NOMEM; } qlines[1] = NULL; |