diff options
Diffstat (limited to 'src/ipcpd/unicast/fa.c')
-rw-r--r-- | src/ipcpd/unicast/fa.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ipcpd/unicast/fa.c b/src/ipcpd/unicast/fa.c index 61abff52..23676c23 100644 --- a/src/ipcpd/unicast/fa.c +++ b/src/ipcpd/unicast/fa.c @@ -217,8 +217,10 @@ static int fa_rib_readdir(char *** buf) pthread_rwlock_rdlock(&fa.flows_lock); - if (fa.n_flows < 1) + if (fa.n_flows < 1) { + *buf = NULL; goto no_flows; + } *buf = malloc(sizeof(**buf) * fa.n_flows); if (*buf == NULL) |