X-Git-Url: https://git.saurik.com/apple/syslog.git/blobdiff_plain/57b0aad2c678a02fcc3e8b5756d4a13d9061babf..c4fdb7d114b21b1b97b3777dfb8a8053693e7a91:/aslcommon/asl_memory.c diff --git a/aslcommon/asl_memory.c b/aslcommon/asl_memory.c index 5964cf0..66d8703 100644 --- a/aslcommon/asl_memory.c +++ b/aslcommon/asl_memory.c @@ -1372,7 +1372,17 @@ asl_memory_match(asl_memory_t *s, aslresponse query, aslresponse *res, uint64_t } } - if (i >= s->record_count) return ASL_STATUS_OK; + if (i >= s->record_count) + { + if (qp != NULL) + { + for (i = 0; i < query->count; i++) asl_memory_record_free(s, qp[i]); + free(qp); + free(qtype); + } + + return ASL_STATUS_OK; + } start = where;