summaryrefslogtreecommitdiffstats
path: root/plugins/check_dig.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_dig.c')
-rw-r--r--plugins/check_dig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_dig.c b/plugins/check_dig.c
index 7c39a243..ff160591 100644
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
@@ -97,7 +97,7 @@ main (int argc, char **argv)
97 input_buffer[strcspn (input_buffer, "\r\n")] = '\0'; 97 input_buffer[strcspn (input_buffer, "\r\n")] = '\0';
98 98
99 if (strstr (input_buffer, query_address) == input_buffer) { 99 if (strstr (input_buffer, query_address) == input_buffer) {
100 asprintf (&output, input_buffer); 100 output = strdup(input_buffer);
101 result = STATE_OK; 101 result = STATE_OK;
102 } 102 }
103 else { 103 else {
@@ -119,7 +119,7 @@ main (int argc, char **argv)
119 result = max_state (result, STATE_WARNING); 119 result = max_state (result, STATE_WARNING);
120 printf ("%s", input_buffer); 120 printf ("%s", input_buffer);
121 if (strlen (output) == 0) 121 if (strlen (output) == 0)
122 asprintf (&output, 1 + index (input_buffer, ':')); 122 output = strdup (1 + index (input_buffer, ':'));
123 } 123 }
124 124
125 (void) fclose (child_stderr); 125 (void) fclose (child_stderr);