diff options
author | Danijel Tasov <m@rbfh.de> | 2023-10-06 08:54:20 (GMT) |
---|---|---|
committer | Danijel Tasov <m@rbfh.de> | 2023-10-06 08:54:20 (GMT) |
commit | 1ad7e163fad45d33a44f398fb2416f1b9086469a (patch) | |
tree | 78c9b8650a6208a36efdcfe87fec03fff296a97d /plugins-root | |
parent | e365f9f58eed501baf1a80c47556191a48b99c3f (diff) | |
download | monitoring-plugins-1ad7e163fad45d33a44f398fb2416f1b9086469a.tar.gz |
check malloc
Diffstat (limited to 'plugins-root')
-rw-r--r-- | plugins-root/check_icmp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index 274277b..197ce32 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c | |||
@@ -758,6 +758,10 @@ main(int argc, char **argv) | |||
758 | 758 | ||
759 | host = list; | 759 | host = list; |
760 | table = malloc(sizeof(struct rta_host *) * targets); | 760 | table = malloc(sizeof(struct rta_host *) * targets); |
761 | if(!table) { | ||
762 | crash("main(): malloc failed for host table"); | ||
763 | return 3; | ||
764 | } | ||
761 | 765 | ||
762 | i = 0; | 766 | i = 0; |
763 | while(host) { | 767 | while(host) { |