summaryrefslogtreecommitdiff
path: root/source3/torture/locktest.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/torture/locktest.c')
-rw-r--r--source3/torture/locktest.c10
1 files changed, 6 insertions, 4 deletions
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;
}