summaryrefslogtreecommitdiff
path: root/source3/smbd/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/session.c')
-rw-r--r--source3/smbd/session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index f3a678b205..48afb5389f 100644
--- a/source3/smbd/session.c
+++ b/source3/smbd/session.c
@@ -231,7 +231,7 @@ static int gather_sessioninfo(const char *key, struct sessionid *session,
{
struct session_list *sesslist = (struct session_list *)private_data;
- sesslist->sessions = TALLOC_REALLOC_ARRAY(
+ sesslist->sessions = talloc_realloc(
sesslist->mem_ctx, sesslist->sessions, struct sessionid,
sesslist->count+1);
@@ -264,7 +264,7 @@ int list_sessions(TALLOC_CTX *mem_ctx, struct sessionid **session_list)
sesslist.sessions = NULL;
ret = sessionid_traverse_read(gather_sessioninfo, (void *) &sesslist);
- if (ret == -1) {
+ if (ret < 0) {
DEBUG(3, ("Session traverse failed\n"));
SAFE_FREE(sesslist.sessions);
*session_list = NULL;