X-Git-Url: https://git.saurik.com/apple/syslog.git/blobdiff_plain/57b0aad2c678a02fcc3e8b5756d4a13d9061babf..1496e7d1dd53a3a0fed695ccb7ea6f5197672810:/aslcommon/asl_mini_memory.c diff --git a/aslcommon/asl_mini_memory.c b/aslcommon/asl_mini_memory.c index 1f45aec..08ba36e 100644 --- a/aslcommon/asl_mini_memory.c +++ b/aslcommon/asl_mini_memory.c @@ -1051,7 +1051,17 @@ asl_mini_memory_match(asl_mini_memory_t *s, aslresponse query, aslresponse *res, } } - 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_mini_memory_record_free(s, qp[i]); + free(qp); + free(qtype); + } + + return ASL_STATUS_OK; + } start = where;