summaryrefslogtreecommitdiffstats
path: root/source/libsmb/asn1.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/libsmb/asn1.c')
-rw-r--r--source/libsmb/asn1.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/libsmb/asn1.c b/source/libsmb/asn1.c
index 937e063c625..6ebe9ab62cf 100644
--- a/source/libsmb/asn1.c
+++ b/source/libsmb/asn1.c
@@ -23,6 +23,14 @@
/* free an asn1 structure */
void asn1_free(ASN1_DATA *data)
{
+ struct nesting *nesting = data->nesting;
+
+ while (nesting) {
+ struct nesting *nnext = nesting->next;
+ free(nesting);
+ nesting = nnext;
+ };
+ data->nesting = NULL;
SAFE_FREE(data->data);
}