Browse code

modules/ims_usrloc_scscf: incorret assignment that causes incorrect shm free on pkg_malloc'd memory

Jason Penton authored on 24/02/2014 09:03:17
Showing 1 changed files
... ...
@@ -614,10 +614,8 @@ int preload_udomain(db1_con_t* _c, udomain_t* _d) {
614 614
 
615 615
 			if (!VAL_NULL(vals + 7)) {
616 616
 				blob = VAL_BLOB(vals + 7);
617
-
618
-				bin_alloc(&x, VAL_BLOB(vals + 7).len);
619
-				memcpy(x.s, VAL_BLOB(vals + 7).s, VAL_BLOB(vals + 7).len);
620
-				x.s = blob.s;
617
+				bin_alloc(&x, blob.len);
618
+				memcpy(x.s, blob.s, blob.len);
621 619
 				x.len = blob.len;
622 620
 				x.max = 0;
623 621
 				subscription = bin_decode_ims_subscription(&x);