]> rtime.felk.cvut.cz Git - frescor/forb.git/commitdiff
forb: Objects must be properly reference-counted
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 11 Feb 2011 15:07:40 +0000 (16:07 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 11 Feb 2011 15:07:40 +0000 (16:07 +0100)
This fixes some nasty segfaults.

src/iop.c

index 1115c1f3b064999f0ddfdc79620a6b98d47fca2b..6ba0ec3107796471f9272e20c36d43201acdb8d3 100644 (file)
--- a/src/iop.c
+++ b/src/iop.c
@@ -757,7 +757,7 @@ forb_request_send(forb_request_t *req, unsigned index, CORBA_Environment *env)
                memset(exec_req, 0, sizeof(exec_req));
                exec_req->request_type = FORB_EXEC_REQ_LOCAL; 
                exec_req->input_request = req;
-               exec_req->obj = req->obj;
+               exec_req->obj = forb_object_duplicate(req->obj);
                exec_req->method_index = req->method_ind;
                exec_req->interface = req->interface;
                req->cdr_request.rptr = index;