From de7fd585b11413113304334dd75ba6a207ec69eb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 4 Dec 2007 16:56:18 -0800 Subject: The usual !pstring... Jeremy. (This used to be commit b676262a781363e7be49b21817668a53cca75c2d) --- source3/torture/locktest.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/torture/locktest.c') diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c index baf676f646..4dc8e53578 100644 --- a/source3/torture/locktest.c +++ b/source3/torture/locktest.c @@ -125,13 +125,15 @@ static void print_brl(struct file_id id, { #if NASTY_POSIX_LOCK_HACK { - pstring cmd; static SMB_INO_T lastino; if (lastino != ino) { - slprintf(cmd, sizeof(cmd), - "egrep POSIX.*%u /proc/locks", (int)ino); - system(cmd); + char *cmd; + if (asprintf(&cmd, + "egrep POSIX.*%u /proc/locks", (int)ino) > 0) { + system(cmd); + SAFE_FREE(cmd); + } } lastino = ino; } -- cgit