Message ID | 20180218033640.17715-5-tobleminer@gmail.com |
---|---|
State | Changes Requested |
Delegated to: | John Crispin |
Headers | show
Return-Path: <openwrt-devel-bounces@lists.openwrt.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (helo) smtp.helo=arrakis.dune.hu (client-ip=78.24.191.176; helo=arrakis.dune.hu; envelope-from=openwrt-devel-bounces@lists.openwrt.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Vr00109B"; dkim-atps=neutral Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zkXf30Z40z9ryg for <incoming@patchwork.ozlabs.org>; Sun, 18 Feb 2018 14:38:18 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id BF88BB91386; Sun, 18 Feb 2018 04:37:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Sun, 18 Feb 2018 04:37:24 +0100 (CET) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 4DE66B912A5 for <openwrt-devel@lists.openwrt.org>; Sun, 18 Feb 2018 04:37:10 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-lf0-f66.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by arrakis.dune.hu (Postfix) with ESMTPS for <openwrt-devel@lists.openwrt.org>; Sun, 18 Feb 2018 04:37:10 +0100 (CET) Received: by mail-lf0-f66.google.com with SMTP id 37so8863918lfs.7 for <openwrt-devel@lists.openwrt.org>; Sat, 17 Feb 2018 19:37:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nBAZuLYlHbmtazovP39ZX98+cH0t90aFxC8IFOQCIII=; b=Vr00109B5sPups7/igqzz7Xf/V7SyanQs/coXqAnS2ORxp0cpnso//847YzP1jy7SY hGuS48aQ9bz0ko4r+fCt5HomQBnVu7n6h2DA2V6qSqxCVSD3LlO6mhpizEyRFcUxRjX6 /eIqpKEWUwj+q55AHoBTulBf5iFVuAQpOqinHl0FmcfV04KIbnR0sYZp2JzjLuZQOjMY HNthtckh8LdgVNkPnCgt2X4rw8QSqGsib9xsJQi2vrt9M4+9vVgIgJyhlhNuStpJd+Y2 OBtVvTI+KzAVgPgsNQJe9m6FQgARou+bpfIBRA0URMVYfl4JTB+RAZMBwVCKeYdZDN0X wSmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nBAZuLYlHbmtazovP39ZX98+cH0t90aFxC8IFOQCIII=; b=pZNBmjixiVjKA71a87iCoJnB9nxCxVy7NBkM01jUPuKCDTpAS45ZHXBuUUk+7T4iVS kZOZzFTZoAOuPM24J5DrQIvM2KV5o4pfaoHVJ6TVfgFNMsle5SATvSLCHy+h0y1RJRJz MQ8R56k1uE2Q40NkhsCRItYh5OkfY/r4mlKGgaXowMNRcc0uQIpEoKUIW4ivbEnBUwh7 D201BfI/DE7hN80aG1KggE4AEqgcCeTiZxv4nML7xVEIWInJXtZ145EGtnxjJCTfA3Ft MLNw31nWEaWoV1taW8LHCr0ZKyI0NAEqQElygjtqnkpmJVWeSMCzucFCiKvv5aD9yYQi LXQQ== X-Gm-Message-State: APf1xPALgGWXS7AOAuyEouv75HyjvkjnE7ySI8Qxqmf7lnmdEreOUtyf 2AgE60hwl0XHnIcmv8pkd043vg== X-Google-Smtp-Source: AH8x226JNdq2tPusddsTHBLu+mJNCTN1n6sg4vYJkQmxAF5MTMXhTyKsGz5fE2JlH2is9gvlwDWuGw== X-Received: by 10.46.23.219 with SMTP id 88mr7137850ljx.49.1518925029274; Sat, 17 Feb 2018 19:37:09 -0800 (PST) Received: from sunsetshimmer.lan ([2a02:8108:17c0:1500:f666:aee7:edff:2dfc]) by smtp.gmail.com with ESMTPSA id b72sm400115ljf.87.2018.02.17.19.37.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Feb 2018 19:37:08 -0800 (PST) From: Tobias Schramm <tobleminer@gmail.com> To: openwrt-devel@lists.openwrt.org Date: Sun, 18 Feb 2018 04:36:38 +0100 Message-Id: <20180218033640.17715-5-tobleminer@gmail.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180218033640.17715-1-tobleminer@gmail.com> References: <20180218033640.17715-1-tobleminer@gmail.com> Subject: [OpenWrt-Devel] [PATCH 4/6] uclient-http: Handle memory allocation failure X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <https://lists.openwrt.org/cgi-bin/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.openwrt.org/pipermail/openwrt-devel/> List-Post: <mailto:openwrt-devel@lists.openwrt.org> List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> List-Subscribe: <https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> |
Series |
uclient: Handle memory allocation failures
|
expand
|
diff --git a/uclient-http.c b/uclient-http.c index 2a3cf5d..24f091e 100644 --- a/uclient-http.c +++ b/uclient-http.c @@ -944,6 +944,9 @@ static struct uclient *uclient_http_alloc(void) struct uclient_http *uh; uh = calloc_a(sizeof(*uh)); + if(!uh) + return NULL; + uh->disconnect_t.cb = uclient_http_disconnect_cb; blob_buf_init(&uh->headers, 0);
Signed-off-by: Tobias Schramm <tobleminer@gmail.com> --- uclient-http.c | 3 +++ 1 file changed, 3 insertions(+)