#vulnerable code 
                                @Override
    public Collection<Injectable<?>> start(GraphDatabaseService graphDatabaseService, Configuration config) {
        EmbeddedDriver embeddedDriver = new EmbeddedDriver(graphDatabaseService);
        sessionFactory = new SessionFactory(packages);
        return Arrays.asList(new OgmInjectable<>(sessionFactory, SessionFactory.class));
    } 
                            #location 3 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Override
    public Collection<Injectable<?>> start(GraphDatabaseService graphDatabaseService, Configuration config) {
        EmbeddedDriver embeddedDriver = new EmbeddedDriver(graphDatabaseService);
        sessionFactory = createSessionFactory(embeddedDriver);
        return Arrays.asList(new OgmInjectable<>(sessionFactory, SessionFactory.class));
    }