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
diff --git a/src/gb/gprs_ns_sns.c b/src/gb/gprs_ns_sns.c
index dd8d3a2..aa8b121 100644
--- a/src/gb/gprs_ns_sns.c
+++ b/src/gb/gprs_ns_sns.c
@@ -498,7 +498,7 @@
}
/* 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]);