]> pd.if.org Git - zpackage/blobdiff - zpm-note.c
use environment variables for scripts
[zpackage] / zpm-note.c
index ced0d3fd525a19fbdc45ca6037f5b58462702bfb..33e7fa2a923b03de0779fefac186fa14798ca8d6 100644 (file)
@@ -49,7 +49,7 @@ int main(int ac, char **av){
         * zpm note -A <n>
         */
        int list = 0, delete = 0, ack = 0;
-       while ((opt = getopt(ac, av, "f:p:P:H:m:n:lDAa")) != -1) {
+       while ((opt = getopt(ac, av, "f:p:P:H:m:n:lDAae")) != -1) {
                switch (opt) {
                        case 'f': dbfile = optarg; break;
                        case 'p': n.pkgid = optarg; break;
@@ -106,5 +106,8 @@ int main(int ac, char **av){
        }
        fail = pkg.error;
        zpm_close(&pkg);
+       if (n.id) {
+               zpm_note_free(&n);
+       }
        return fail ? EXIT_FAILURE : EXIT_SUCCESS;
 }