]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
admin_socket: fix uninitialized accept() param
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Thu, 21 Jul 2011 20:10:39 +0000 (13:10 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Thu, 21 Jul 2011 20:10:39 +0000 (13:10 -0700)
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/common/admin_socket.cc

index 6f6481e35342df6ba17dfee87b16b8ce2abb5d39..6b30c548be79e96fba770d221c7086e68a8e12fd 100644 (file)
@@ -236,7 +236,7 @@ private:
   {
     int ret;
     struct sockaddr_un address;
-    socklen_t address_length;
+    socklen_t address_length = sizeof(address);
     ldout(m_parent->m_cct, 30) << "AdminSocket: calling accept" << dendl;
     int connection_fd = accept(m_sock_fd, (struct sockaddr*) &address,
                                   &address_length);