Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 258988
b: refs/heads/master
c: 2a6d0ac
h: refs/heads/master
v: v3
  • Loading branch information
Davidlohr Bueso authored and Linus Torvalds committed Jul 26, 2011
1 parent 8eca5d4 commit 6ca78cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a8beb93067764344523386e0e5388d3fd78add7
refs/heads/master: 2a6d0ac182688d4d23357ece744978706c044aad
6 changes: 4 additions & 2 deletions trunk/arch/um/os-Linux/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static int __init make_tempfile(const char *template, char **out_tempname,

find_tempdir();
if ((tempdir == NULL) || (strlen(tempdir) >= MAXPATHLEN))
return -1;
goto out;

if (template[0] != '/')
strcpy(tempname, tempdir);
Expand All @@ -191,13 +191,15 @@ static int __init make_tempfile(const char *template, char **out_tempname,
}
if (do_unlink && (unlink(tempname) < 0)) {
perror("unlink");
goto out;
goto close;
}
if (out_tempname) {
*out_tempname = tempname;
} else
free(tempname);
return fd;
close:
close(fd);
out:
free(tempname);
return -1;
Expand Down

0 comments on commit 6ca78cc

Please sign in to comment.