asn1_extract_blob() stops further asn1 processing by setting has_error.
Don't call asn1_has_error() after asn1_extract_blob() has been successful
otherwise we get an "Failed to build krb5 wrapper at" message
on success.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11702
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
goto err;
}
+ asn1_free(data);
+ data = NULL;
+
err:
- if (asn1_has_error(data)) {
- DEBUG(1, ("Failed to build krb5 wrapper at offset %d\n",
- (int)asn1_current_ofs(data)));
- }
+ if (data != NULL) {
+ if (asn1_has_error(data)) {
+ DEBUG(1, ("Failed to build krb5 wrapper at offset %d\n",
+ (int)asn1_current_ofs(data)));
+ }
- asn1_free(data);
+ asn1_free(data);
+ }
return ret;
}