rr;
    }


     /*
      * From here, you create transactions and perform database operations
      * exactly as you would if you were logging to disk. This part is
      * omitted for brevity.
      */

      ...

err:
    /* Close the databases (omitted) */

    ...

    /* Close the environment */
    if (envp != NULL) {
        ret_c = envp-&gt;close(envp, 0);
        if (ret_c != 0) {
            fprintf(stderr, "environment close failed: %s\n",
                db_strerror(ret_c));
            ret = r