asl_action_control_set_param(const char *s)
{
__block char **l;
- __block char *p;
uint32_t count = 0;
if (s == NULL) return -1;
/* create / modify a module */
if ((!strcasecmp(l[1], "define")) && (strcmp(l[0], "*")))
{
- p = strdup(s);
- if (p == NULL)
+ char *str = strdup(s);
+ if (str == NULL)
{
asldebug("asl_action_control_set_param: memory allocation failed\n");
free_string_list(l);
dispatch_sync(asl_action_queue, ^{
asl_out_module_t *m;
asl_out_rule_t *r;
+ char *p = str;
/* skip name, whitespace, "define" */
while ((*p != ' ') && (*p != '\t')) p++;
}
});
- free(p);
+ free(str);
free_string_list(l);
return 0;
}
}
}
- if (uid_out != NULL) *uid_out = uid;
-
gid = -2;
val = asl_msg_get_val_for_key(msg, ASL_KEY_GID);
if (val == NULL)
break;
}
- case SOURCE_UDP_SOCKET:
case SOURCE_ASL_MESSAGE:
case SOURCE_LAUNCHD:
{
}
}
+ if (uid_out != NULL) *uid_out = uid;
+
/* Sender */
if (sval == NULL) sval = asl_msg_get_val_for_key(msg, ASL_KEY_SENDER);
if (sval == NULL)