[virt-tools-list] [PATCH virt-viewer 07/10] iso-dialog: Implement functionality provided by oVirt foreign menu
Christophe Fergeau
cfergeau at redhat.com
Wed Jan 18 12:54:19 UTC 2017
On Wed, Jan 18, 2017 at 10:12:20AM -0200, Eduardo Lima (Etrunko) wrote:
> On 17/01/17 14:01, Christophe Fergeau wrote:
> > On Fri, Jan 13, 2017 at 07:11:09PM -0200, Eduardo Lima (Etrunko) wrote:
> >> Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
> >> ---
> >> src/remote-viewer-iso-list-dialog.c | 205 ++++++++++++++++++++++++++++-
> >> src/resources/ui/remote-viewer-iso-list.ui | 5 +-
> >> 2 files changed, 206 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/src/remote-viewer-iso-list-dialog.c b/src/remote-viewer-iso-list-dialog.c
> >> index 858719c..00371ff 100644
> >> --- a/src/remote-viewer-iso-list-dialog.c
> >> +++ b/src/remote-viewer-iso-list-dialog.c
> >> @@ -20,12 +20,16 @@
> >>
> >> #include <config.h>
> >>
> >> +#include <stdlib.h>
> >
> > This is added because you call free() in a few places, but why are you
> > not using g_free() in these places?
>
> As a matter of consistency, because in ovirt-foreign-menu, we return a
> char *, not a gchar *, although I know there is no difference. I can
> change that function to return a gchar and then use g_free all around.
Ah, I usually use gchar/char interchangeably, though now I understand
why you used free() rather than g_free(). I usually pick g_free VS free
by looking at how the memory was allocated. Here, it was allocated
through g_object_get(), so I'd use g_free().
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20170118/ce67b9ac/attachment.sig>
More information about the virt-tools-list
mailing list