Author: ek.kato
Date: Wed Jan 14 21:22:52 2009
New Revision: 5716

Modified:
   trunk/uim/uim-helper-client.c

Log:
* uim-helper-client.c (uim_read_buf) : Don't release the
  buffer even the connection is closed since the buffer may be
  shared with other fds.


Modified: trunk/uim/uim-helper-client.c
==============================================================================
--- trunk/uim/uim-helper-client.c       (original)
+++ trunk/uim/uim-helper-client.c       Wed Jan 14 21:22:52 2009
@@ -125,7 +125,8 @@
   if (uim_helper_check_connection_fd(fd))
     goto error;

-  uim_read_buf = uim_strdup("");
+  if (!uim_read_buf)
+    uim_read_buf = uim_strdup("");
   uim_disconnect_cb = disconnect_cb;
   uim_fd = fd;

@@ -153,8 +154,6 @@
   if (uim_disconnect_cb)
     uim_disconnect_cb();

-  free(uim_read_buf);
-  uim_read_buf = NULL;
   uim_fd = -1;
 }

Reply via email to