Let X be a Gorenstein variety. And $f:Y\longrightarrow X$ is a resolution, Y is normal. And we have $K_Y=f^*K_X+\sum_{i}a_iE_i$, $E_i$ are exceptional divisors. Then consider the push-forward of the line bundle $K_Y$ (since Y is Gorenstein, K_Y is locally free). $f_*K_Y=f_*f^*K_X+\sum_{i}a_if_*(E_i)=K_X+\sum_{i}a_if_*(E_i)$. My question is what is $\sum_{i}a_if_*(E_i)$ in Pic(X)? Is it zero?
For example X is smooth and Y is blowup one point in X. Then what is $f_*{E}$ as a sheaf on X? As Remy pointed out, it is may not be a line bundle. Is there a general theorem about this issue?