]> git.saurik.com Git - apple/syslog.git/blobdiff - aslcommon/asl_mini_memory.c
syslog-100.0.1.tar.gz
[apple/syslog.git] / aslcommon / asl_mini_memory.c
index 1f45aec44b52307b16845479f9538dc825952669..08ba36e0abd7384f584dd45d09fff42c7247e4a3 100644 (file)
@@ -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;