diff
24  	if (!mem)
+25  	    goto cleanup;
26  	pool = &mem->defpool;
...
+100  cleanup:
+101      // Perform necessary cleanup and return an error
+102      return -ENOMEM;
