s3: Fix an uninitialized variable in idmap_tdb2_sid_to_id()
authorVolker Lendecke <vl@samba.org>
Thu, 29 Apr 2010 10:11:04 +0000 (12:11 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 29 Apr 2010 12:35:25 +0000 (14:35 +0200)
When we find an invalid record in the database, there's no point in checking
the non-existing value against the range limits.

source3/winbindd/idmap_tdb2.c

index ec83cae8a3cdeb103bbafabb87e4c290ee70622c..3e2021457a906d7978ae0bc499b0d7600e83a2cc 100644 (file)
@@ -750,6 +750,7 @@ static NTSTATUS idmap_tdb2_sid_to_id(struct idmap_tdb2_context *ctx, struct id_m
        } else { /* Unknown record type ! */
                DEBUG(2, ("Found INVALID record %s -> %s\n", keystr, (const char *)data.dptr));
                ret = NT_STATUS_INTERNAL_DB_ERROR;
+               goto done;
        }
 
        /* apply filters before returning result */