Clarification of terminology: We say an injection $A \xrightarrow{i} B$ splits iff the induced short exact sequence $0 \to A \xrightarrow{i} B \to B/i(A) \to 0$ splits. Similarly, we say a surjection $B \xrightarrow{p} C$ splits iff $0 \to \ker p \to B \xrightarrow{p} C \to 0$ splits.
Here are the definitions of injective and projective modules I'm using:
$Q$ is injective if, and only if, $\operatorname{Hom}(\ast, Q)$ takes injections to surjections ($0 \to A \to B$ exact implies $\operatorname{Hom}(B,Q) \to \operatorname{Hom}(A,Q) \to 0$ exact).
$P$ is projective if and only if $\operatorname{Hom}(P, \ast)$ takes surjections to surjections.
Want to show: $Q$ is injective if and only if injections from $Q$ always split. The $\Longrightarrow$ direction is straightforward. The $\Longleftarrow$ direction, not so much. (Dummit and Foote relegates this to the exercises and uses the nontrivial fact that every module is contained in an injective module. I imagine this is to parallel their proof that $P$ is projective iff surjections to $P$ always split, which uses the fact that every module is a quotient of a free, hence projective, module.)
It bothered me that these dual concepts don't have "dual" proofs, so I came up with one using pushouts and pullbacks (D&F introduce these in exercise 27, if you have the book). The argument is rather straightforward, so I feel like something has to be wrong, but I can't figure out what it is. Here it is:
Suppose injections from $Q$ always split, suppose $i: A \to B$ injects, and suppose $f \in \operatorname{Hom}(A,Q)$. Consider the pushout of $i$ and $f$: $$M = B \oplus Q/\{(i(a), -f(a)): a \in A\}.$$ Then we get the following maps "for free": $j: B \to M$ and $g: Q \to M$, with $ji = gf$. (At this point, we haven't used any of our hypotheses.) Now, it's straightforward to check that $g$ injects because $i$ does, hence $g$ splits and we get a map $h: M \to Q$ with $hg = 1$. Thus, $hj$ lifts $f$.
Verification that $g$ injects because $i$ does: If $g(q) = 0$, then $(0,q) = (i(a), -f(a))$ for some $a$. But $i(a) = 0$ implies that $ a = 0$, and this in turn implies that $-f(a) = 0$, so that $q = 0$.
(A completely analogous proof using the pullback shows that: projections to $P$ always split $\implies P$ is projective.)
Where is the flaw in this proof?