summaryrefslogtreecommitdiff
path: root/source3/torture/nsstest.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-04 17:05:33 -0800
committerJeremy Allison <jra@samba.org>2007-12-04 17:05:33 -0800
commit755051b569762c13f8f4b4e52fa1183108a4e466 (patch)
tree70720b3e78a1fb964f8ed3ce7f1441648811aa17 /source3/torture/nsstest.c
parentde7fd585b11413113304334dd75ba6a207ec69eb (diff)
downloadsamba-755051b569762c13f8f4b4e52fa1183108a4e466.tar.gz
samba-755051b569762c13f8f4b4e52fa1183108a4e466.tar.bz2
samba-755051b569762c13f8f4b4e52fa1183108a4e466.zip
pull_ascii_pstring is gone.
Jeremy. (This used to be commit 288aacce4b56d159218be311019cb951e5a232fd)
Diffstat (limited to 'source3/torture/nsstest.c')
-rw-r--r--source3/torture/nsstest.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/torture/nsstest.c b/source3/torture/nsstest.c
index 2e0892e020..ca662262f8 100644
--- a/source3/torture/nsstest.c
+++ b/source3/torture/nsstest.c
@@ -28,11 +28,13 @@ static int total_errors;
static void *find_fn(const char *name)
{
- pstring s;
+ char *s;
static void *h;
void *res;
- pstr_sprintf(s, "_nss_%s_%s", nss_name, name);
+ if (asprintf(&s, "_nss_%s_%s", nss_name, name) < 0) {
+ exit(1);
+ }
if (!h) {
h = sys_dlopen(so_path, RTLD_LAZY);
@@ -45,8 +47,10 @@ static void *find_fn(const char *name)
if (!res) {
printf("Can't find function %s\n", s);
total_errors++;
+ SAFE_FREE(s);
return NULL;
}
+ SAFE_FREE(s);
return res;
}