summaryrefslogtreecommitdiff
path: root/source3/torture/locktest.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-04 16:56:18 -0800
committerJeremy Allison <jra@samba.org>2007-12-04 16:56:18 -0800
commitde7fd585b11413113304334dd75ba6a207ec69eb (patch)
treebfc8b1c808609b735036cc5b04971d10d61f6b91 /source3/torture/locktest.c
parente262c41c6119957c5e4b8d5752040881021175a3 (diff)
downloadsamba-de7fd585b11413113304334dd75ba6a207ec69eb.tar.gz
samba-de7fd585b11413113304334dd75ba6a207ec69eb.tar.bz2
samba-de7fd585b11413113304334dd75ba6a207ec69eb.zip
The usual !pstring...
Jeremy. (This used to be commit b676262a781363e7be49b21817668a53cca75c2d)
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;
}