diff options
| author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-04-12 21:48:07 +0700 | 
|---|---|---|
| committer | Vadim Yanitskiy <axilirator@gmail.com> | 2019-04-12 22:16:18 +0700 | 
| commit | b7344d08df34521c05d597fd0776f93204b78bac (patch) | |
| tree | 5f2eec139287e1d27082420f5f5ad982ebc14e09 /src | |
| parent | 4f619c202c67dd68b1c3a13d40ad50fa2a6e582d (diff) | |
gb/gprs_ns_sns.c: fix incorrect sizeof() calculation
Calling sizeof() on a pointer would result in getting size of the
pointer (usually 4 or 8 bytes) itself, but not the size of the
memory it points to.
Change-Id: I83f55a9638b75d9097d37992f7c84707791f10f6
Fixes: CID#194266
Diffstat (limited to 'src')
| -rw-r--r-- | src/gb/gprs_ns_sns.c | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/src/gb/gprs_ns_sns.c b/src/gb/gprs_ns_sns.c index dd8d3a2d..aa8b121a 100644 --- a/src/gb/gprs_ns_sns.c +++ b/src/gb/gprs_ns_sns.c @@ -498,7 +498,7 @@ static void gprs_sns_st_configured(struct osmo_fsm_inst *fi, uint32_t event, voi  			}  			/* make a copy as do_sns_delete() will change the array underneath us */  			ip4_remote = talloc_memdup(fi, gss->ip4_remote, -						   gss->num_ip4_remote*sizeof(v4_list)); +						   gss->num_ip4_remote*sizeof(*v4_list));  			for (i = 0; i < gss->num_ip4_remote; i++) {  				if (ip4_remote[i].ip_addr == ip_addr) {  					rc = do_sns_delete(fi, &ip4_remote[i]); | 
