* [PATCH 1/1] Memory leak in scripts/dtc/util.c @ 2014-02-27 18:24 ` xypron.glpk 0 siblings, 0 replies; 9+ messages in thread From: xypron.glpk-Mmb7MZpHnFY @ 2014-02-27 18:24 UTC (permalink / raw) To: grant.likely-QSEj5FYQhm4dnm+yROfE0A Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Heinrich Schuchardt From: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org> buf was leaked if out of memory Signed-off-by: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org> --- scripts/dtc/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/dtc/util.c b/scripts/dtc/util.c index 2422c34..a1e2e59 100644 --- a/scripts/dtc/util.c +++ b/scripts/dtc/util.c @@ -210,9 +210,11 @@ int utilfdt_read_err(const char *filename, char **buffp) do { /* Expand the buffer to hold the next chunk */ if (offset == bufsize) { + char *buf_old = buf; bufsize *= 2; buf = realloc(buf, bufsize); if (!buf) { + buf = buf_old; ret = ENOMEM; break; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 1/1] Memory leak in scripts/dtc/util.c @ 2014-02-27 18:24 ` xypron.glpk 0 siblings, 0 replies; 9+ messages in thread From: xypron.glpk @ 2014-02-27 18:24 UTC (permalink / raw) To: grant.likely; +Cc: robh+dt, devicetree, linux-kernel, Heinrich Schuchardt From: Heinrich Schuchardt <xypron.glpk@gmx.de> buf was leaked if out of memory Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> --- scripts/dtc/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/dtc/util.c b/scripts/dtc/util.c index 2422c34..a1e2e59 100644 --- a/scripts/dtc/util.c +++ b/scripts/dtc/util.c @@ -210,9 +210,11 @@ int utilfdt_read_err(const char *filename, char **buffp) do { /* Expand the buffer to hold the next chunk */ if (offset == bufsize) { + char *buf_old = buf; bufsize *= 2; buf = realloc(buf, bufsize); if (!buf) { + buf = buf_old; ret = ENOMEM; break; } -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] Memory leak in scripts/dtc/util.c 2014-02-27 18:24 ` xypron.glpk (?) @ 2014-02-28 1:32 ` Rob Herring [not found] ` <CAL_JsqK9Wquv6kgefyPvy0JqXNO7Cx2+iN_ss=CtgXnKEjrF-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> -1 siblings, 1 reply; 9+ messages in thread From: Rob Herring @ 2014-02-28 1:32 UTC (permalink / raw) To: xypron.glpk, Jon Loeliger Cc: Grant Likely, Rob Herring, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org On Thu, Feb 27, 2014 at 12:24 PM, <xypron.glpk@gmx.de> wrote: > From: Heinrich Schuchardt <xypron.glpk@gmx.de> > > buf was leaked if out of memory > > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> > --- > scripts/dtc/util.c | 2 ++ > 1 file changed, 2 insertions(+) This needs to be made against upstream dtc repo (on kernel.org now). Also, there is a newly created list for dtc specific topics: http://vger.kernel.org/vger-lists.html#devicetree-compiler Rob > > diff --git a/scripts/dtc/util.c b/scripts/dtc/util.c > index 2422c34..a1e2e59 100644 > --- a/scripts/dtc/util.c > +++ b/scripts/dtc/util.c > @@ -210,9 +210,11 @@ int utilfdt_read_err(const char *filename, char **buffp) > do { > /* Expand the buffer to hold the next chunk */ > if (offset == bufsize) { > + char *buf_old = buf; > bufsize *= 2; > buf = realloc(buf, bufsize); > if (!buf) { > + buf = buf_old; > ret = ENOMEM; > break; > } > -- > 1.7.10.4 > > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <CAL_JsqK9Wquv6kgefyPvy0JqXNO7Cx2+iN_ss=CtgXnKEjrF-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* [PATCH 1/1] Remove dead code in util.c 2014-02-28 1:32 ` Rob Herring @ 2014-03-01 8:11 ` xypron.glpk 0 siblings, 0 replies; 9+ messages in thread From: xypron.glpk-Mmb7MZpHnFY @ 2014-03-01 8:11 UTC (permalink / raw) To: grant.likely-QSEj5FYQhm4dnm+yROfE0A, robh+dt-DgEjT+Ai2ygdnm+yROfE0A Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Heinrich Schuchardt From: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org> xrealloc never returns null Signed-off-by: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org> --- util.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/util.c b/util.c index be67836..1ce8b97 100644 --- a/util.c +++ b/util.c @@ -219,10 +219,6 @@ int utilfdt_read_err_len(const char *filename, char **buffp, off_t *len) if (offset == bufsize) { bufsize *= 2; buf = xrealloc(buf, bufsize); - if (!buf) { - ret = ENOMEM; - break; - } } ret = read(fd, &buf[offset], bufsize - offset); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 1/1] Remove dead code in util.c @ 2014-03-01 8:11 ` xypron.glpk 0 siblings, 0 replies; 9+ messages in thread From: xypron.glpk @ 2014-03-01 8:11 UTC (permalink / raw) To: grant.likely, robh+dt Cc: devicetree-compiler, devicetree, linux-kernel, Heinrich Schuchardt From: Heinrich Schuchardt <xypron.glpk@gmx.de> xrealloc never returns null Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> --- util.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/util.c b/util.c index be67836..1ce8b97 100644 --- a/util.c +++ b/util.c @@ -219,10 +219,6 @@ int utilfdt_read_err_len(const char *filename, char **buffp, off_t *len) if (offset == bufsize) { bufsize *= 2; buf = xrealloc(buf, bufsize); - if (!buf) { - ret = ENOMEM; - break; - } } ret = read(fd, &buf[offset], bufsize - offset); -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
[parent not found: <1393661507-7197-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>]
* Re: [PATCH 1/1] Remove dead code in util.c 2014-03-01 8:11 ` xypron.glpk @ 2014-03-02 13:11 ` David Gibson -1 siblings, 0 replies; 9+ messages in thread From: David Gibson @ 2014-03-02 13:11 UTC (permalink / raw) To: xypron.glpk-Mmb7MZpHnFY Cc: grant.likely-QSEj5FYQhm4dnm+yROfE0A, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, devicetree-compiler-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 499 bytes --] On Sat, Mar 01, 2014 at 09:11:47AM +0100, xypron.glpk-Mmb7MZpHnFY@public.gmane.org wrote: > From: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org> > > xrealloc never returns null > > Signed-off-by: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org> Applied, thanks. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson [-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] Remove dead code in util.c @ 2014-03-02 13:11 ` David Gibson 0 siblings, 0 replies; 9+ messages in thread From: David Gibson @ 2014-03-02 13:11 UTC (permalink / raw) To: xypron.glpk Cc: grant.likely, robh+dt, devicetree-compiler, devicetree, linux-kernel [-- Attachment #1: Type: text/plain, Size: 433 bytes --] On Sat, Mar 01, 2014 at 09:11:47AM +0100, xypron.glpk@gmx.de wrote: > From: Heinrich Schuchardt <xypron.glpk@gmx.de> > > xrealloc never returns null > > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Applied, thanks. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson [-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Incomplete information in MAINTAINERS [not found] ` <CAL_JsqK9Wquv6kgefyPvy0JqXNO7Cx2+iN_ss=CtgXnKEjrF-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2014-03-01 8:11 ` xypron.glpk @ 2014-03-01 8:41 ` Heinrich Schuchardt [not found] ` <53119D3B.3050406-Mmb7MZpHnFY@public.gmane.org> 1 sibling, 1 reply; 9+ messages in thread From: Heinrich Schuchardt @ 2014-03-01 8:41 UTC (permalink / raw) To: Rob Herring; +Cc: Grant Likely, devicetree-compiler-u79uwXL29TY76Z2rM5mHXA Hello Rob, you wrote >> Also, there is a newly created list for dtc specific topics: >> http://vger.kernel.org/vger-lists.html#devicetree-compiler Could you, please, have file MAINTAINERS updated to include aforementioned list. Otherwise scripts/get_maintainer.pl will not show it. Best regards Heinrich Schuchardt -- To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <53119D3B.3050406-Mmb7MZpHnFY@public.gmane.org>]
* Re: Incomplete information in MAINTAINERS [not found] ` <53119D3B.3050406-Mmb7MZpHnFY@public.gmane.org> @ 2014-03-03 13:26 ` Rob Herring 0 siblings, 0 replies; 9+ messages in thread From: Rob Herring @ 2014-03-03 13:26 UTC (permalink / raw) To: Heinrich Schuchardt Cc: Grant Likely, devicetree-compiler-u79uwXL29TY76Z2rM5mHXA On Sat, Mar 1, 2014 at 2:41 AM, Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org> wrote: > Hello Rob, > > you wrote >>> Also, there is a newly created list for dtc specific topics: >>> http://vger.kernel.org/vger-lists.html#devicetree-compiler > > Could you, please, have file MAINTAINERS updated to include > aforementioned list. Otherwise scripts/get_maintainer.pl > will not show it. I can change the list, but there's not a real good solution here. We really don't want patches against the kernel. Perhaps the maintainer should be "send-patches-against-upstream-dtc-e83xkrq8dvZBDgjK7y7TUQ@public.gmane.org". Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-03-03 13:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-27 18:24 [PATCH 1/1] Memory leak in scripts/dtc/util.c xypron.glpk-Mmb7MZpHnFY
2014-02-27 18:24 ` xypron.glpk
2014-02-28 1:32 ` Rob Herring
[not found] ` <CAL_JsqK9Wquv6kgefyPvy0JqXNO7Cx2+iN_ss=CtgXnKEjrF-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-01 8:11 ` [PATCH 1/1] Remove dead code in util.c xypron.glpk-Mmb7MZpHnFY
2014-03-01 8:11 ` xypron.glpk
[not found] ` <1393661507-7197-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2014-03-02 13:11 ` David Gibson
2014-03-02 13:11 ` David Gibson
2014-03-01 8:41 ` Incomplete information in MAINTAINERS Heinrich Schuchardt
[not found] ` <53119D3B.3050406-Mmb7MZpHnFY@public.gmane.org>
2014-03-03 13:26 ` Rob Herring
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.