From 5c7e2a6fe7c6f04e9b5d6cb241100a70bbccc031 Mon Sep 17 00:00:00 2001 From: rob Date: Thu, 13 Sep 2007 10:50:14 +0000 Subject: [PATCH] note a potential leak git-svn-id: https://svn.aros.org:8080/svn/aros/trunk/AROS@26531 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- rom/devs/filesys/packet/command.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rom/devs/filesys/packet/command.c b/rom/devs/filesys/packet/command.c index 3aa95875f..4d0068763 100644 --- a/rom/devs/filesys/packet/command.c +++ b/rom/devs/filesys/packet/command.c @@ -824,6 +824,10 @@ AROS_UFH3(void, packet_reply, case ACTION_FINDUPDATE: { struct FileHandle *fh = (struct FileHandle *) BADDR(dp->dp_Arg1); + /* XXX this is wrong. if we can't get the memory, we still have an + * open file which gets leaked. this handle needs to be allocated + * before the call goes out to the handler, or we need to schedule + * ACTION_END to clean up the file */ handle = (struct ph_handle *) AllocMem(sizeof(struct ph_handle), MEMF_PUBLIC | MEMF_CLEAR); if (handle == NULL) { iofs->io_DosError = ERROR_NO_FREE_STORE; -- 2.11.4.GIT