After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 660925 - ShellContactSystem: Make address search actually work
ShellContactSystem: Make address search actually work
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-10-04 20:20 UTC by Matthias Clasen
Modified: 2011-10-05 19:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ShellContactSystem: Make address search actually work (1.51 KB, patch)
2011-10-04 20:21 UTC, Matthias Clasen
reviewed Details | Review
ShellContactSystem: Make address search actually work (1.91 KB, patch)
2011-10-05 15:59 UTC, Florian Müllner
committed Details | Review

Description Matthias Clasen 2011-10-04 20:20:58 UTC
The code was not dealing properly with what folks returns
for im and email addresses.
Comment 1 Matthias Clasen 2011-10-04 20:21:01 UTC
Created attachment 198247 [details] [review]
ShellContactSystem: Make address search actually work
Comment 2 Florian Müllner 2011-10-04 20:36:03 UTC
Review of attachment 198247 [details] [review]:

Looks good, but I'm pretty sure the existing code is leaking, so let's fix that.

::: src/shell-contact-system.c
@@ +189,3 @@
       while (gee_iterator_next (addrs_iter))
         {
+          FolksImFieldDetails *field = gee_iterator_get (addrs_iter);

I think gee_iterator_get() is transfer-full - apparently the existing code got it wrong as well, but this looks like a good opportunity to fix it.

@@ +209,3 @@
       while (gee_iterator_next (addrs_iter))
         {
+          FolksEmailFieldDetails *field = gee_iterator_get (addrs_iter);

Dto.
Comment 3 Florian Müllner 2011-10-05 15:59:52 UTC
Created attachment 198351 [details] [review]
ShellContactSystem: Make address search actually work

Fixed leaks.
Comment 4 Colin Walters 2011-10-05 16:22:42 UTC
Review of attachment 198351 [details] [review]:

Looks safe enough to me.
Comment 5 Florian Müllner 2011-10-05 19:10:07 UTC
Attachment 198351 [details] pushed as 472b20d - ShellContactSystem: Make address search actually work