if the decode of the db contents failed, the search key's string
never got freed, because the key's address is held in the stack.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1413
dc483132-0cff-0310-8789-
dd5450dbe970
goto cleanup;
contents = dbm_fetch(db, key);
- if (contents.dptr == NULL) {
- found = 0;
- } else {
- if (retval = decode_princ_contents(&contents, entries))
- goto cleanup;
- found = 1;
- }
free_encode_princ_dbmkey(&key);
+
+ if (contents.dptr == NULL)
+ found = 0;
+ else if (retval = decode_princ_contents(&contents, entries))
+ goto cleanup;
+ else found = 1;
+
(void) dbm_close(db);
(void) krb5_dbm_db_unlock(); /* unlock read lock */
if (krb5_dbm_db_end_read(transaction) == 0)