From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f174.google.com (mail-ob0-f174.google.com [209.85.214.174]) by dpdk.org (Postfix) with ESMTP id EDAF758DD for ; Thu, 8 Jan 2015 09:19:09 +0100 (CET) Received: by mail-ob0-f174.google.com with SMTP id uz6so7068204obc.5 for ; Thu, 08 Jan 2015 00:19:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=BPAfmTPHj3NpQk+Z8q7RyXjD6P94yO4zp7rOgLvh5lc=; b=b6Fjv8SWffUK68zUcJ3+5DKdqboz0aRA/g+RhsYdfQ/i+6Uk41cS2wjST+y3JfUNH9 Rro2suAJ9kiqL45Xn9yYAh1aYGFBMCk+T77DvNSxV0oq6bnerbKN0uVfGNa/kRnvjGLB Dn7sq/huBl2oxumpUkuJT53joUw/ITOCkBdnb31IO2DOveH5kfb/PpO70h6Hegqhaypv QhJ1Mudq7+pSwlZ9O0WvgX6VfOpLlzjwqiekaNhGeY+1ACvUP8KmjrPQ9o6VV5jRlhpw FzXN10yutrxRCYA0OV/5LoYVQ39VN3oHWGqIL5UVxseilUW7IM21MVnF/8/zrGahoWq+ XnGQ== X-Gm-Message-State: ALoCoQmvt0JNbjs9PC4Jpp6sibFrK2172ccPMHdYly1whN4f0MInSz276Cshsjf7x1npcMSc4Zur MIME-Version: 1.0 X-Received: by 10.182.143.42 with SMTP id sb10mr4796901obb.27.1420705149288; Thu, 08 Jan 2015 00:19:09 -0800 (PST) Received: by 10.76.95.198 with HTTP; Thu, 8 Jan 2015 00:19:09 -0800 (PST) In-Reply-To: <20150107145900.2a139ee6@urahara> References: <1420635809-30976-1-git-send-email-david.marchand@6wind.com> <1420635809-30976-3-git-send-email-david.marchand@6wind.com> <20150107145900.2a139ee6@urahara> Date: Thu, 8 Jan 2015 09:19:09 +0100 Message-ID: From: David Marchand To: Stephen Hemminger Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 2/2] devargs: remove limit on parameters length X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2015 08:19:10 -0000 On Wed, Jan 7, 2015 at 11:59 PM, Stephen Hemminger < stephen@networkplumber.org> wrote: > On Wed, 7 Jan 2015 14:03:29 +0100 > David Marchand wrote: > > > + buf = strdup(devargs_str); > > + if (buf == NULL) { > > + RTE_LOG(ERR, EAL, "cannot allocate temp memory for > devargs\n"); > > + goto fail; > > + } > > + > > If string is only used in same function you might consider using strdupa() > which avoids > worrying about freeing in error paths. > Hum, why not. My only concern is strdupa() availability on BSD. -- David Marchand