]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
check isc_buffer_allocate result
authorMark Andrews <marka@isc.org>
Sun, 23 Aug 2015 09:42:39 +0000 (19:42 +1000)
committerMark Andrews <marka@isc.org>
Sun, 23 Aug 2015 09:42:39 +0000 (19:42 +1000)
bin/tests/wire_test.c

index 3303c166c845c0e01bf0a6147502869ae8e632c3..2c5e001e0f514ca95ed0d00b48f01e9fa805516b 100644 (file)
@@ -113,6 +113,7 @@ main(int argc, char *argv[]) {
        isc_boolean_t need_close = ISC_FALSE;
        isc_boolean_t tcp = ISC_FALSE;
        isc_boolean_t rawdata = ISC_FALSE;
+       isc_result_t result;
        isc_uint8_t c;
        FILE *f;
        int ch;
@@ -184,7 +185,8 @@ main(int argc, char *argv[]) {
        } else
                f = stdin;
 
-       isc_buffer_allocate(mctx, &input, 64 * 1024);
+       result = isc_buffer_allocate(mctx, &input, 64 * 1024);
+       RUNTIME_CHECK(result == ISC_R_SUCCESS);
 
        if (rawdata) {
                while (fread(&c, 1, 1, f) != 0) {