]> git.saurik.com Git - apple/syslog.git/blobdiff - libsystem_asl.tproj/src/asl_client.c
syslog-377.0.1.tar.gz
[apple/syslog.git] / libsystem_asl.tproj / src / asl_client.c
index fd87f34b6854920d7f68527cb83175627418d4e5..7aa045502834cf7eddbe15d27be5f63746a51841 100644 (file)
@@ -240,8 +240,9 @@ _do_server_match(asl_msg_list_t *qlist, size_t *last, size_t start, size_t count
        count64 = count;
 
        kstatus = _asl_server_match(asl_server_port, vmstr, len, start64, count64, duration, dir, (caddr_t *)&res, &reslen, &last64, (int *)&status);
        count64 = count;
 
        kstatus = _asl_server_match(asl_server_port, vmstr, len, start64, count64, duration, dir, (caddr_t *)&res, &reslen, &last64, (int *)&status);
-       *last = last64;
+       if (kstatus != KERN_SUCCESS) return NULL;
 
 
+       *last = last64;
        out = asl_msg_list_from_string(res);
        vm_deallocate(mach_task_self(), (vm_address_t)res, reslen);
 
        out = asl_msg_list_from_string(res);
        vm_deallocate(mach_task_self(), (vm_address_t)res, reslen);