[2634] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

Re: [PATCH] Don't leak an owl_popexec if fork or pipe fail

daemon@ATHENA.MIT.EDU (David A Benjamin)
Sat Sep 18 02:53:03 2010

Date: Sat, 18 Sep 2010 02:52:59 -0400 (EDT)
From: David A Benjamin <davidben@MIT.EDU>
To: barnowl-dev@mit.edu
In-Reply-To: <1284792239-19605-1-git-send-email-davidben@mit.edu>

Nevermind, this is actually nonsense because of the viewwin close hook. 
Sigh.

David

On Fri, 17 Sep 2010, David Benjamin wrote:

> ---
> popexec.c |    2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/popexec.c b/popexec.c
> index 53b25aa..ab01920 100644
> --- a/popexec.c
> +++ b/popexec.c
> @@ -33,6 +33,7 @@ owl_popexec *owl_popexec_new(const char *command)
>
>   if (0 != pipe(pipefds)) {
>     owl_function_error("owl_function_popless_exec: pipe failed\n");
> +    owl_popexec_unref(pe);
>     return NULL;
>   }
>   parent_read_fd = pipefds[0];
> @@ -42,6 +43,7 @@ owl_popexec *owl_popexec_new(const char *command)
>     close(pipefds[0]);
>     close(pipefds[1]);
>     owl_function_error("owl_function_popless_exec: fork failed\n");
> +    owl_popexec_unref(pe);
>     return NULL;
>   } else if (pid != 0) {
>     close(child_write_fd);
> -- 
> 1.7.2.1.45.gb1c4
>
>

home help back first fref pref prev next nref lref last post