Blame util/check-malloc-errs

Packit c4476c
#! /bin/sh
Packit c4476c
# Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
#
Packit c4476c
# Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
# this file except in compliance with the License.  You can obtain a copy
Packit c4476c
# in the file LICENSE in the source distribution or at
Packit c4476c
# https://www.openssl.org/source/license.html
Packit c4476c
Packit c4476c
(
Packit c4476c
    pcregrep -rnM 'OPENSSL_.?alloc.*\n.*if.*NULL.*\n.*return'  crypto ssl
Packit c4476c
    pcregrep -rnM 'if.*OPENSSL_.?alloc.*NULL.*\n.*.*return' crypto ssl
Packit c4476c
) | tee /tmp/out$$
Packit c4476c
X=0
Packit c4476c
test -s /tmp/out$$ && X=1
Packit c4476c
rm /tmp/out$$
Packit c4476c
exit $X