summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2006-06-13 08:59:12 +0000
committerCarsten Haitzler <raster@rasterman.com>2006-06-13 08:59:12 +0000
commit28dff2e36e77797ec2d28ff69855a2355bf97d3a (patch)
tree7ec0cc02c4a97f61b59726041d7f1d0c3443faff /legacy
parentd796633973b950db7b1db7be1ba91a34935e47b7 (diff)
fd leak in dns lookups! fixed! :)
SVN revision: 23411
Diffstat (limited to 'legacy')
-rw-r--r--legacy/ecore/src/lib/ecore_con/ecore_con_dns.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con_dns.c b/legacy/ecore/src/lib/ecore_con/ecore_con_dns.c
index 50a4a77ef8..91ac8adb7b 100644
--- a/legacy/ecore/src/lib/ecore_con/ecore_con_dns.c
+++ b/legacy/ecore/src/lib/ecore_con/ecore_con_dns.c
@@ -270,6 +270,7 @@ struct _CB_Data
270 Ecore_Fd_Handler *fdh; 270 Ecore_Fd_Handler *fdh;
271 pid_t pid; 271 pid_t pid;
272 Ecore_Event_Handler *handler; 272 Ecore_Event_Handler *handler;
273 int fd2;
273}; 274};
274 275
275static void 276static void
@@ -312,6 +313,7 @@ _ecore_con_dns_data_handler(void *data, Ecore_Fd_Handler *fd_handler)
312 } 313 }
313 } 314 }
314 close(ecore_main_fd_handler_fd_get(cbdata->fdh)); 315 close(ecore_main_fd_handler_fd_get(cbdata->fdh));
316 close(cbdata->fd2);
315 ecore_main_fd_handler_del(cbdata->fdh); 317 ecore_main_fd_handler_del(cbdata->fdh);
316 ecore_event_handler_del(cbdata->handler); 318 ecore_event_handler_del(cbdata->handler);
317 free(cbdata); 319 free(cbdata);
@@ -329,6 +331,7 @@ _ecore_con_dns_exit_handler(void *data, int type, void *event)
329 if (cbdata->pid != ev->pid) return 1; 331 if (cbdata->pid != ev->pid) return 1;
330 return 0; 332 return 0;
331 close(ecore_main_fd_handler_fd_get(cbdata->fdh)); 333 close(ecore_main_fd_handler_fd_get(cbdata->fdh));
334 close(cbdata->fd2);
332 ecore_main_fd_handler_del(cbdata->fdh); 335 ecore_main_fd_handler_del(cbdata->fdh);
333 ecore_event_handler_del(cbdata->handler); 336 ecore_event_handler_del(cbdata->handler);
334 free(cbdata); 337 free(cbdata);
@@ -357,6 +360,7 @@ ecore_con_dns_lookup(const char *name,
357 } 360 }
358 cbdata->cb_done = done_cb; 361 cbdata->cb_done = done_cb;
359 cbdata->data = data; 362 cbdata->data = data;
363 cbdata->fd2 = fd[1];
360 if (!(cbdata->fdh = ecore_main_fd_handler_add(fd[0], ECORE_FD_READ, 364 if (!(cbdata->fdh = ecore_main_fd_handler_add(fd[0], ECORE_FD_READ,
361 _ecore_con_dns_data_handler, 365 _ecore_con_dns_data_handler,
362 cbdata, 366 cbdata,