summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 167ed8f)
raw | patch | inline | side by side (parent: 167ed8f)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Wed, 29 Jan 2003 06:15:32 +0000 (06:15 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Wed, 29 Jan 2003 06:15:32 +0000 (06:15 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@266 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_by_ssh.c | patch | blob | history |
diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c
index 34e6727478c17d0f3e0e45edb3794cddb0998ffc..0cffaeb2ef251c81e77bd4e5c6aa8efb6fc343f7 100644 (file)
--- a/plugins/check_by_ssh.c
+++ b/plugins/check_by_ssh.c
passive = TRUE;
break;
case 's': /* description of service to check */
- service = realloc (service, ++services);
+ service = realloc (service, (++services) * sizeof(char *));
p1 = optarg;
while (p2 = index (p1, ':')) {
*p2 = '\0';
asprintf (&service[services-1], "%s", p1);
- service = realloc (service, ++services);
+ service = realloc (service, (++services) * sizeof(char *));
p1 = p2 + 1;
}
asprintf (&service[services-1], "%s", p1);