<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 14, 2019 at 9:22 AM Joel Sherrill <<a href="mailto:joel@rtems.org">joel@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">---<br>
 cpukit/libfs/src/pipe/fifo.c | 13 +++++--------<br>
 1 file changed, 5 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/cpukit/libfs/src/pipe/fifo.c b/cpukit/libfs/src/pipe/fifo.c<br>
index 71d5f85..3275e5f 100644<br>
--- a/cpukit/libfs/src/pipe/fifo.c<br>
+++ b/cpukit/libfs/src/pipe/fifo.c<br>
@@ -149,18 +149,15 @@ static int pipe_new(<br>
   pipe = *pipep;<br>
   if (pipe == NULL) {<br>
     err = pipe_alloc(&pipe);<br>
-    if (err)<br>
-      goto out;<br>
+    if (err) {<br>
+      pipe_unlock();<br>
+      return err;<br>
+    }<br>
   }<br>
<br>
   PIPE_LOCK(pipe);<br>
<br>
-  if (*pipep == NULL) {<br>
-    if (err)<br>
-      pipe_free(pipe);<br>
-    else<br>
-      *pipep = pipe;<br>
-  }<br>
+  *pipep = pipe;<br>
<br>
 out:<br>
   pipe_unlock();<br></blockquote><div><br></div><div>you can also remove the 'out:' label, and probably return 0?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
-- <br>
1.8.3.1<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div></div>