Browse files

Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:
 "Two small cifs fixes"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  fs/cifs/cifs_dfs_ref.c: fix potential memory leakage
  cifs: fix srcip_matches() for ipv6
  • Loading branch information...
2 parents d93816a + 10b8c7d commit 66e2d3e8c2294543a6f0453d974940171829e7dd @torvalds torvalds committed Jan 25, 2013
Showing with 3 additions and 1 deletion.
  1. +2 −0 fs/cifs/cifs_dfs_ref.c
  2. +1 −1 fs/cifs/connect.c
View
2 fs/cifs/cifs_dfs_ref.c
@@ -226,6 +226,8 @@ char *cifs_compose_mount_options(const char *sb_mountdata,
compose_mount_options_err:
kfree(mountdata);
mountdata = ERR_PTR(rc);
+ kfree(*devname);
+ *devname = NULL;
goto compose_mount_options_out;
}
View
2 fs/cifs/connect.c
@@ -1917,7 +1917,7 @@ srcip_matches(struct sockaddr *srcaddr, struct sockaddr *rhs)
}
case AF_INET6: {
struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *)srcaddr;
- struct sockaddr_in6 *vaddr6 = (struct sockaddr_in6 *)&rhs;
+ struct sockaddr_in6 *vaddr6 = (struct sockaddr_in6 *)rhs;
return ipv6_addr_equal(&saddr6->sin6_addr, &vaddr6->sin6_addr);
}
default:

0 comments on commit 66e2d3e

Please sign in to comment.