This article details a known issue related to the underlying Intel Math Kernel Library (MKL). We use the Gurobi C API as an example.
When compiling your program against Gurobi 9.0.2 C API, Valgrind reports a possible memory leak:
==12260== 32 bytes in 1 blocks are still reachable in loss record 1 of 2
==12260== at 0x4C2FFAC: calloc (vg_replace_malloc.c:762)
==12260== by 0x7EFF626: _dlerror_run (dlerror.c:141)
==12260== by 0x7EFEFA0: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==12260== by 0x568F6FC: mkl_serv_inspector_suppress (in /opt/gurobi902/linux64/lib/libgurobi.so.9.0.2)
==12260== by 0x568F62C: mkl_serv_lock (in /opt/gurobi902/linux64/lib/libgurobi.so.9.0.2)
==12260== by 0x568B588: mkl_serv_finalize (in /opt/gurobi902/linux64/lib/libgurobi.so.9.0.2)
==12260== by 0x4010E04: _dl_fini (dl-fini.c:240)
==12260== by 0x7748FF7: __run_exit_handlers (exit.c:82)
==12260== by 0x7749044: exit (exit.c:104)
==12260== by 0x772F836: (below main) (libc-start.c:325)
Gurobi uses MKL. The current version of MKL allocates two blocks of memory that are never released. This consumes a fixed 79 bytes of memory. In practice, 79 bytes is minuscule, so this is not a cause for concern.
A similar issue is not present in Gurobi 8.1.1. This is because Gurobi 8.1.1 uses an earlier version of MKL, which does not contain the same bug.