summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyveload/bhyveload.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-06 00:01:03 +0000
committerpfg <pfg@FreeBSD.org>2016-04-06 00:01:03 +0000
commit16ce739aba6b6217a03635a9ec0dcf2aacfb2258 (patch)
treeab0d2a38c9b09249c9847d5f20559cd6d5f29898 /usr.sbin/bhyveload/bhyveload.c
parent577607dffc5297f8f8ffb8b81c3e1b87101140d8 (diff)
downloadFreeBSD-src-16ce739aba6b6217a03635a9ec0dcf2aacfb2258.zip
FreeBSD-src-16ce739aba6b6217a03635a9ec0dcf2aacfb2258.tar.gz
bhyveload: fix from loading undefined size.
We were setting an incorrect/undefined size and as it came out the st struct was not really being used at all. This was actually a bug but by sheer luck it had no visual effect. CID: 1194320 Reviewed by: grehan
Diffstat (limited to 'usr.sbin/bhyveload/bhyveload.c')
-rw-r--r--usr.sbin/bhyveload/bhyveload.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c
index 8417f2a..9df680f 100644
--- a/usr.sbin/bhyveload/bhyveload.c
+++ b/usr.sbin/bhyveload/bhyveload.c
@@ -152,7 +152,6 @@ struct cb_file {
static int
cb_open(void *arg, const char *filename, void **hp)
{
- struct stat st;
struct cb_file *cf;
char path[PATH_MAX];
@@ -169,7 +168,7 @@ cb_open(void *arg, const char *filename, void **hp)
return (errno);
}
- cf->cf_size = st.st_size;
+ cf->cf_size = cf->cf_stat.st_size;
if (S_ISDIR(cf->cf_stat.st_mode)) {
cf->cf_isdir = 1;
cf->cf_u.dir = opendir(path);
OpenPOWER on IntegriCloud