aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/pas/pas-card-cursor.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-03-29 09:38:45 +0800
committerChris Lahey <clahey@src.gnome.org>2000-03-29 09:38:45 +0800
commit68b4d99fcb3d2ddf45cf0c004d3a0bac341f9616 (patch)
tree103ed00062df4872d4f3daf165523a91866bce5a /addressbook/backend/pas/pas-card-cursor.c
parentb88b59741fd9d2bc4097b803db4447e15d004d79 (diff)
downloadgsoc2013-evolution-68b4d99fcb3d2ddf45cf0c004d3a0bac341f9616.tar
gsoc2013-evolution-68b4d99fcb3d2ddf45cf0c004d3a0bac341f9616.tar.gz
gsoc2013-evolution-68b4d99fcb3d2ddf45cf0c004d3a0bac341f9616.tar.bz2
gsoc2013-evolution-68b4d99fcb3d2ddf45cf0c004d3a0bac341f9616.tar.lz
gsoc2013-evolution-68b4d99fcb3d2ddf45cf0c004d3a0bac341f9616.tar.xz
gsoc2013-evolution-68b4d99fcb3d2ddf45cf0c004d3a0bac341f9616.tar.zst
gsoc2013-evolution-68b4d99fcb3d2ddf45cf0c004d3a0bac341f9616.zip
Fixed memory allocation.
2000-03-28 Christopher James Lahey <clahey@helixcode.com> * addressbook/backend/pas/pas-card-cursor.c: Fixed memory allocation. * addressbook/backend/pas/pas-backend-file.c: Fixed memory allocation. Made database stuff not do an extra entry. * addressbook/backend/ebook/test-client.c: Add test for get_all_cards functionality. Changed database name to test.db. * addressbook/backend/ebook/e-card-cursor.c: Changed bonobo_object to gtk_object in a couple of places. svn path=/trunk/; revision=2236
Diffstat (limited to 'addressbook/backend/pas/pas-card-cursor.c')
-rw-r--r--addressbook/backend/pas/pas-card-cursor.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/addressbook/backend/pas/pas-card-cursor.c b/addressbook/backend/pas/pas-card-cursor.c
index b6ef91f41c..3f66848332 100644
--- a/addressbook/backend/pas/pas-card-cursor.c
+++ b/addressbook/backend/pas/pas-card-cursor.c
@@ -64,10 +64,13 @@ impl_pas_card_cursor_get_nth (PortableServer_Servant servant,
CORBA_Environment *ev)
{
PASCardCursor *cursor = PAS_CARD_CURSOR (bonobo_object_from_servant (servant));
- if ( cursor->priv->get_nth )
- return cursor->priv->get_nth( cursor, n, cursor->priv->data );
- else
- return "";
+ if ( cursor->priv->get_nth ) {
+ char *vcard = cursor->priv->get_nth( cursor, n, cursor->priv->data );
+ char *retval = CORBA_string_dup (vcard);
+ g_free (vcard);
+ return retval;
+ } else
+ return CORBA_string_dup ("");
}
/*