[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[mig] 05/15: Fix spurious deallocation
From: |
Samuel Thibault |
Subject: |
[mig] 05/15: Fix spurious deallocation |
Date: |
Sat, 28 Sep 2013 12:42:29 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch master
in repository mig.
commit 495615802f3671f1656d92a8712341a9b78d8dd1
Author: Olaf Buddenhagen <address@hidden>
Date: Tue Feb 19 23:30:18 2013 +0100
Fix spurious deallocation
* server.c (WriteDestroyArg): Only dealloc out-of-line memory from
request message if KERN_SUCCESS.
---
server.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/server.c b/server.c
index a49bb01..a041e61 100644
--- a/server.c
+++ b/server.c
@@ -761,16 +761,21 @@ WriteDestroyArg(FILE *file, register const argument_t
*arg)
if (akCheck(arg->argKind, akbIndefinite)) {
/*
* Deallocate only if out-of-line.
+ *
+ * Also skip deallocation if error occured in processing the RPC.
+ * (Generic RPC handling code will clean up in this case)
*/
argument_t *count = arg->argCount;
ipc_type_t *btype = it->itElement;
int multiplier = btype->itTypeSize / btype->itNumber;
- fprintf(file, "\tif (!In%dP->%s%s.msgt_inline)\n",
+ fprintf(file, "\tif (OutP->%s == KERN_SUCCESS)\n",
+ arg->argRoutine->rtRetCode->argMsgField);
+ fprintf(file, "\t\tif (!In%dP->%s%s.msgt_inline)\n",
arg->argRequestPos,
arg->argTTName,
arg->argLongForm ? ".msgtl_header" : "");
- fprintf(file, "\t\t%smig_deallocate(* (vm_offset_t *) %s, ",
+ fprintf(file, "\t\t\t%smig_deallocate(* (vm_offset_t *) %s, ",
SubrPrefix, InArgMsgField(arg));
if (multiplier > 1)
fprintf(file, "%d * ", multiplier);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/mig.git
- [mig] 11/15: GNU MIG 1.4., (continued)
- [mig] 11/15: GNU MIG 1.4., Samuel Thibault, 2013/09/28
- [mig] 10/15: Generate ChangeLog files for distributions., Samuel Thibault, 2013/09/28
- [mig] 13/15: Merge branch 'upstream', Samuel Thibault, 2013/09/28
- [mig] 09/15: Drop the auto keyword, Samuel Thibault, 2013/09/28
- [mig] 14/15: New upstream snapshot, Samuel Thibault, 2013/09/28
- [mig] 03/15: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/mig, Samuel Thibault, 2013/09/28
- [mig] 06/15: Remove unused file alloc.h, Samuel Thibault, 2013/09/28
- [mig] 04/15: Merge remote-tracking branch 'savannah/master', Samuel Thibault, 2013/09/28
- [mig] 15/15: Revert "Stop installing the upstream ChangeLog", Samuel Thibault, 2013/09/28
- [mig] 07/15: Drop the register keyword, Samuel Thibault, 2013/09/28
- [mig] 05/15: Fix spurious deallocation,
Samuel Thibault <=
- [mig] 01/15: Make the installation tree relocatable., Samuel Thibault, 2013/09/28
- [mig] 12/15: Imported Upstream version 1.4, Samuel Thibault, 2013/09/28