Fix more asprintf warnings and some error path errors.
[jra/samba/.git] / source3 / printing / print_generic.c
index 5806b292064821254d5c723ce0ff204ab98daf4e..b789354999d2ae7391acabe8f6471f1b8bef98d4 100644 (file)
@@ -205,7 +205,9 @@ static int generic_job_submit(int snum, struct printjob *pjob)
 
  out:
 
-       chdir(wd);
+       if (chdir(wd) == -1) {
+               smb_panic("chdir failed in generic_job_submit");
+       }
        TALLOC_FREE(current_directory);
         return ret;
 }