git.samba.org
/
tprouty
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66fa21e
)
Set proper python exception when running out of memory.
author
Jelmer Vernooij
<jelmer@samba.org>
Wed, 7 Jan 2009 21:40:13 +0000
(22:40 +0100)
committer
Jelmer Vernooij
<jelmer@samba.org>
Wed, 7 Jan 2009 21:40:13 +0000
(22:40 +0100)
source4/librpc/rpc/pyrpc.c
patch
|
blob
|
history
diff --git
a/source4/librpc/rpc/pyrpc.c
b/source4/librpc/rpc/pyrpc.c
index 9863a6aeb55c499929e8e4c4f8165017112902ac..b841fdad651dc0e8a30c9ae97e5d38bbe39280ea 100644
(file)
--- a/
source4/librpc/rpc/pyrpc.c
+++ b/
source4/librpc/rpc/pyrpc.c
@@
-38,12
+38,16
@@
static PyObject *py_dcerpc_run_function(dcerpc_InterfaceObject *iface, struct Py
}
mem_ctx = talloc_new(NULL);
- if (mem_ctx == NULL)
+ if (mem_ctx == NULL) {
+ PyErr_NoMemory();
return NULL;
+ }
r = talloc_zero_size(mem_ctx, md->table->calls[md->opnum].struct_size);
- if (r == NULL)
+ if (r == NULL) {
+ PyErr_NoMemory();
return NULL;
+ }
if (!md->pack_in_data(args, kwargs, r)) {
talloc_free(mem_ctx);