aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_ns2.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-01-31 11:44:57 +0100
committerHarald Welte <laforge@osmocom.org>2021-02-01 09:39:29 +0100
commitbdfb8b9104fde2a053f86953ecbbdb1b2f265b9d (patch)
tree0fb01a9fabc8627961d9c2b1b5e367f5b586bdcf /src/gb/gprs_ns2.c
parentc3aa8f903a58db8af5c2687a3c040fe9f49474fb (diff)
ns2: Memory allocation failures are ENOMEM, not ENOSPC
ENOSPC is used with non-volatile (disk) storage, while ENOMEM is customarily used for RAM allocation failures. Change-Id: Ia4c16d8278dc30c7cc69169b18428cda5272738d
Diffstat (limited to 'src/gb/gprs_ns2.c')
-rw-r--r--src/gb/gprs_ns2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 4f3bc5e5..2dde6938 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -1367,12 +1367,12 @@ int ns2_bind_alloc(struct gprs_ns2_inst *nsi, const char *name,
bind = talloc_zero(nsi, struct gprs_ns2_vc_bind);
if (!bind)
- return -ENOSPC;
+ return -ENOMEM;
bind->name = talloc_strdup(bind, name);
if (!bind->name) {
talloc_free(bind);
- return -ENOSPC;
+ return -ENOMEM;
}
bind->nsi = nsi;