[3001] in BarnOwl Developers

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

Re: [PATCH 1/2] Make owl_keybinding new/delete instead of

daemon@ATHENA.MIT.EDU (Anders Kaseorg)
Thu Mar 24 02:50:03 2011

Date: Thu, 24 Mar 2011 02:49:59 -0400 (EDT)
From: Anders Kaseorg <andersk@MIT.EDU>
To: David Benjamin <davidben@mit.edu>
cc: barnowl-dev@mit.edu
In-Reply-To: <1299790123-17519-1-git-send-email-davidben@mit.edu>

On Thu, 10 Mar 2011, David Benjamin wrote:
> Valgrind is deeply disappointed in this code...
> 
> Hide owl_keybinding_make_keys again, so we don't construct half-baked
> owl_keybinding instances. Instead allow for creating a dummy keybinding.
> Also, initialize all fields of owl_keybinding, or freeing it afterwards
> explodes. Also fix a memory leak in unbindkey.

The g_new0 would be unnecessary if you take advantage of g_strdup(NULL) == 
NULL.  Either way, LGTM.

Anders

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