NS2: follow the change of ownership
When receiving a primitive from the NS2 layer the PCU must free the msg buffer if given. Change-Id: I180433735bfbb3375c41318d7a7709d5845199ba
This commit is contained in:
parent
2c1fed20ab
commit
a2848546d2
|
@ -597,7 +597,7 @@ int gprs_ns_prim_cb(struct osmo_prim_hdr *oph, void *ctx)
|
|||
LOGP(DPCU, LOGL_NOTICE, "NS: %s Unknown prim %d from NS\n",
|
||||
get_value_string(osmo_prim_op_names, oph->operation),
|
||||
oph->operation);
|
||||
return 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
switch (oph->primitive) {
|
||||
|
@ -620,6 +620,10 @@ int gprs_ns_prim_cb(struct osmo_prim_hdr *oph, void *ctx)
|
|||
break;
|
||||
}
|
||||
|
||||
out:
|
||||
if (oph->msg)
|
||||
msgb_free(oph->msg);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue