summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libcli/util/asn1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c
index 83044f8e30..3c669292cb 100644
--- a/source4/libcli/util/asn1.c
+++ b/source4/libcli/util/asn1.c
@@ -510,11 +510,11 @@ BOOL asn1_read_OID_String(struct asn1_data *data, const char **OID)
}
if (!data->has_error) {
- *OID = talloc_strdup(NULL, tmp_oid);
- if (!*OID) goto nomem;
+ *OID = tmp_oid;
+ } else {
+ talloc_free(tmp_oid);
}
- talloc_free(tmp_oid);
return !data->has_error;
nomem:
talloc_free(tmp_oid);