diff options
| author | rimio <vasi.vilvoiu@gmail.com> | 2019-01-07 17:41:03 +0200 |
|---|---|---|
| committer | rimio <vasi.vilvoiu@gmail.com> | 2019-01-07 17:41:03 +0200 |
| commit | 83608e80322642e681918a647ef54a67e7bb15a3 (patch) | |
| tree | 45dd8abf5896e3dea959031664d923ae28da2dbe /src/sstv.c | |
| parent | df66a60b90200b020c3e32a2a6302971b254bbd0 (diff) | |
Some changes
Diffstat (limited to 'src/sstv.c')
| -rw-r--r-- | src/sstv.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -13,6 +13,11 @@ sstv_free_t sstv_free_user = NULL; sstv_error_t sstv_init(sstv_malloc_t alloc_func, sstv_free_t dealloc_func) { + /* Check that either both or none of the functions are provided */ + if ((!alloc_func && dealloc_func) || (alloc_func && !dealloc_func)) { + return SSTV_BAD_INITIALIZERS; + } + /* Keep user functions for allocation/deallocation */ sstv_malloc_user = alloc_func; sstv_free_user = dealloc_func; |
