]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Rx: Use ndo_error() when malloc() fails as in most similar cases
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 11 Mar 2018 15:01:19 +0000 (16:01 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Sun, 11 Mar 2018 15:01:19 +0000 (16:01 +0100)
print-rx.c

index c0ec209f0ce2aeca878a1a2aa5653b35ef694359..f91e936c56e9b47ddfec5396d3c42deb00f6c139 100644 (file)
@@ -1159,7 +1159,7 @@ acl_print(netdissect_options *ndo,
        char fmt[1024];
 
        if ((user = (char *)malloc(maxsize)) == NULL)
-               return;
+               (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC, "acl_print: malloc");
 
        if (sscanf((char *) s, "%d %d\n%n", &pos, &neg, &n) != 2)
                goto finish;