~registry/kmod/master

« back to all changes in this revision

Viewing changes to test/test-loaded.c

  • Committer: Lucas De Marchi
  • Date: 2011-12-12 12:30:01 UTC
  • mfrom: (161.1.30)
  • Revision ID: git-v1:2fee2f13ce5f6b17dd672389de422217c56105e2
Merge branch 'use-mmap'

Conflicts:
        libkmod/libkmod.c

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
        struct kmod_list *list, *itr;
15
15
        int err;
16
16
 
17
 
        ctx = kmod_new(NULL);
 
17
        ctx = kmod_new(NULL, NULL);
18
18
        if (ctx == NULL)
19
19
                exit(EXIT_FAILURE);
20
20
 
23
23
        err = kmod_loaded_get_list(ctx, &list);
24
24
        if (err < 0) {
25
25
                fprintf(stderr, "%s\n", strerror(-err));
 
26
                kmod_unref(ctx);
26
27
                exit(EXIT_FAILURE);
27
28
        }
28
29