exp_name => "sda-8741C4G-end",
exp_perms => "0:0:0660",
rules => <<EOF
+KERNEL=="sda", PROGRAM="/bin/true create-envp"
+KERNEL=="sda", ENV{TESTENV}="change-envp"
KERNEL=="sda", NAME="%k-%s{[dmi/id]product_name}-end", RUN+="socket:@/org/kernel/udev/monitor"
EOF
},
-
);
# set env
return -ENOMEM;
/* envp array, strings will point into monitor buffer */
- free(udev_device->envp);
- udev_device->envp = malloc(sizeof(char *) * ENVP_SIZE);
+ if (udev_device->envp == NULL)
+ udev_device->envp = malloc(sizeof(char *) * ENVP_SIZE);
if (udev_device->envp == NULL)
return -ENOMEM;