[Stgt-devel] Small inconsistency in ssc.c

FUJITA Tomonori fujita.tomonori
Fri Aug 1 01:02:38 CEST 2008


On Fri, 1 Aug 2008 07:42:37 +1000
"Mark Harvey" <markh794 at gmail.com> wrote:

> On Fri, Aug 1, 2008 at 2:30 AM, Richard Sharpe
> <realrichardsharpe at gmail.com> wrote:
> > Hi,
> >
> > I just noticed this ...
> >
> >        ssc = zalloc(sizeof(struct ssc_info));
> >        if (ssc)
> >                dtype_priv(lu) = ssc;
> >        else
> >                return -ENOMEM;
> >
> >        if (spc_lu_init(lu))
> >                return TGTADM_NOMEM;
> >
> > What should be returned during the creation of an LU?
> 
> Good spotting..
> 
> Attached is a patch to fix this.
> (Sorry for the attachment but I don't have pop/imap access)
> 
> It's a one liner..
> Included in-line - you never know maybe cut/paste between vim &
> firefox 3 on Windows won't destroy the tabs..
> 
> From 105df4ed0ff479e93a15261397d638575b11b840 Mon Sep 17 00:00:00 2001
> From: Mark Harvey <markh794 at gmail.com>
> Date: Fri, 1 Aug 2008 06:21:39 +1000
> Subject: Return correct error code on malloc() failure
> 
> Reported-by: Richard Sharpe <realrichardsharpe at gmail.com>
> Signed-off-by: Mark Harvey <markh794 at gmail.com>

Applied, thanks.



More information about the stgt mailing list